diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
index b57e5bfaad7ccc9d45884717115ba9a36d6b7b41_dGVzdHMvdGVzdC1sYXJnZWZpbGVzLnQ=..e82bce7ec843eff37e917d072c7c333146bb573f_dGVzdHMvdGVzdC1sYXJnZWZpbGVzLnQ= 100644
--- a/tests/test-largefiles.t
+++ b/tests/test-largefiles.t
@@ -1832,6 +1832,27 @@
   $ hg add --normal new-largefile
   new-largefile: up to 69 MB of RAM may be required to manage this file
   (use 'hg revert new-largefile' to cancel the pending addition)
+
+Test explicit commit of switch between normal and largefile - make sure both
+the add and the remove is committed.
+
+  $ hg up -qC
+  $ hg forget normal3 large4-renamed
+  $ hg add --large normal3
+  $ hg add large4-renamed
+  $ hg commit -m 'swap' normal3 large4-renamed
+  Invoking status precommit hook
+  A large4-renamed
+  A normal3
+  ? new-largefile
+  ? sub2/large6-renamed
+  $ hg mani
+  .hglf/normal3
+  .hglf/sub2/large6
+  .hglf/sub2/large7
+  normal3
+  sub/normal4
+
   $ cd ..