tests/test-bookmarks.t
changeset 17789 4cfd02c2df9a
parent 17704 3d1a781b23c0
child 17790 0291e122fb05
--- a/tests/test-bookmarks.t	Tue Oct 16 13:35:58 2012 -0500
+++ b/tests/test-bookmarks.t	Wed Oct 17 08:44:49 2012 +0200
@@ -217,12 +217,31 @@
   abort: bookmark name cannot contain newlines
   [255]
 
+  $ hg bookmark -m Z '
+  > '
+  abort: bookmark name cannot contain newlines
+  [255]
+
 bookmark with existing name
 
   $ hg bookmark Z
   abort: bookmark 'Z' already exists (use -f to force)
   [255]
 
+  $ hg bookmark -m Y Z
+  abort: bookmark 'Z' already exists (use -f to force)
+  [255]
+
+bookmark with name of branch
+
+  $ hg bookmark default
+  abort: a bookmark cannot have the name of an existing branch
+  [255]
+
+  $ hg bookmark -m Y default
+  abort: a bookmark cannot have the name of an existing branch
+  [255]
+
 force bookmark with existing name
 
   $ hg bookmark -f Z
@@ -247,6 +266,10 @@
   abort: bookmark names cannot consist entirely of whitespace
   [255]
 
+  $ hg bookmark -m Y ' '
+  abort: bookmark names cannot consist entirely of whitespace
+  [255]
+
 invalid bookmark
 
   $ hg bookmark 'foo:bar'