tests: test debugpathcomplete and debuglabelcomplete
authorBryan O'Sullivan <bryano@fb.com>
Thu, 21 Mar 2013 22:26:01 -0700
changeset 18798 0ea3b8e8ce7a
parent 18797 c394a365483e
child 18799 0ed95fe674a8
tests: test debugpathcomplete and debuglabelcomplete
tests/test-completion.t
--- a/tests/test-completion.t	Thu Mar 21 22:22:21 2013 -0700
+++ b/tests/test-completion.t	Thu Mar 21 22:26:01 2013 -0700
@@ -282,3 +282,37 @@
   unbundle: update
   verify: 
   version: 
+
+  $ hg init a
+  $ cd a
+  $ echo fee > fee
+  $ hg ci -q -Amfee
+  $ mkdir fie
+  $ echo dead > fie/dead
+  $ echo live > fie/live
+  $ hg bookmark fo
+  $ hg branch fie
+  $ hg ci -q -Amfie
+  $ echo fo > fo
+  $ hg branch default
+  $ hg ci -q -Amfo
+  $ echo Fum > Fum
+  $ hg ci -q -AmFum
+  $ hg bookmark Fum
+
+Test debugpathcomplete
+
+  $ hg debugpathcomplete f
+  $ hg debugpathcomplete -f f
+
+  $ hg rm Fum
+  $ hg debugpathcomplete -r F
+
+If one directory and no files match, give an ambiguous answer
+
+  $ hg debugpathcomplete fi
+
+Test debuglabelcomplete
+
+  $ hg debuglabelcomplete
+  $ hg debuglabelcomplete f