tag: add tests for tags with whitespace (issue2174)
authorAfuna
Fri, 11 Feb 2011 22:24:10 +0800
changeset 13399 eff102facb15
parent 13398 661331407163
child 13400 14f3795a5ed7
tag: add tests for tags with whitespace (issue2174)
tests/test-tag.t
--- a/tests/test-tag.t	Fri Feb 11 17:23:24 2011 +0800
+++ b/tests/test-tag.t	Fri Feb 11 22:24:10 2011 +0800
@@ -63,6 +63,18 @@
   $ hg tag -f gack
   $ hg tag --remove gack gorp
 
+  $ hg tag "bleah "
+  abort: tag 'bleah' already exists (use -f to force)
+  [255]
+  $ hg tag " bleah"
+  abort: tag 'bleah' already exists (use -f to force)
+  [255]
+  $ hg tag " bleah"
+  abort: tag 'bleah' already exists (use -f to force)
+  [255]
+  $ hg tag -r 0 "  bleahbleah  "
+  $ hg tag -r 0 " bleah bleah "
+
   $ cat .hgtags
   acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
   acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
@@ -75,6 +87,9 @@
   0000000000000000000000000000000000000000 gack
   336fccc858a4eb69609a291105009e484a6b6b8d gorp
   0000000000000000000000000000000000000000 gorp
+  acb14030fe0a21b60322c440ad2d20cf7685a376 bleahbleah
+  acb14030fe0a21b60322c440ad2d20cf7685a376 bleah bleah
+
   $ cat .hg/localtags
   d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
 
@@ -107,7 +122,9 @@
   $ hg -R test log -r0:5
   changeset:   0:acb14030fe0a
   tag:         bleah
+  tag:         bleah bleah
   tag:         bleah0
+  tag:         bleahbleah
   tag:         foobar
   tag:         localblah
   user:        test
@@ -210,7 +227,7 @@
 
   $ hg tag hgtags-modified
   $ hg rollback
-  rolling back to revision 11 (undo commit)
+  rolling back to revision 13 (undo commit)
   $ hg st
   M .hgtags
   ? .hgtags.orig
@@ -227,7 +244,7 @@
   0 files updated, 1 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   $ hg ci -m 'merge named branch'
-  $ hg up 11
+  $ hg up 13
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg tag new-topo-head