diff --git a/tests/test-issue6550.t b/tests/test-issue6550.t
index 5d1bfde39b95a733c1ed80488f400e218846cdc0_dGVzdHMvdGVzdC1pc3N1ZTY1NTAudA==..b883fc38e07c5f93f89047ba0993ad8c34a32a12_dGVzdHMvdGVzdC1pc3N1ZTY1NTAudA== 100644
--- a/tests/test-issue6550.t
+++ b/tests/test-issue6550.t
@@ -85,3 +85,40 @@
   o  0:c051488dac25 [topic1] A
   
   $ cd ..
+
+Editing commits with a topic on top of a commit without a topic:
+
+  $ hg init repo3
+  $ cd repo3
+  $ echo 1 > A
+  $ hg ci -Aqm A
+  $ hg topic topic1
+  marked working directory as topic: topic1
+  $ echo 1 > B
+  $ hg ci -Aqm B
+  $ echo 1 > C
+  $ hg ci -Aqm C
+  $ hg glog
+  @  2:c3dae6eda73b [topic1] C
+  |
+  o  1:db3a7c9052ac [topic1] B
+  |
+  o  0:a18fe624bf77 [] A
+  
+Swap the order of commits B and C
+
+  $ hg histedit s1 -q --commands - 2>&1 << EOF
+  > pick c3dae6eda73b C
+  > pick db3a7c9052ac B
+  > EOF
+
+Topic of B and C is preserved
+
+  $ hg glog
+  @  4:aa7af5cc1567 [topic1] B
+  |
+  o  3:4bf8cf7b2c73 [topic1] C
+  |
+  o  0:a18fe624bf77 [] A
+  
+  $ cd ..