tests/test-bisect
changeset 8803 2b35ced86b69
parent 8802 ca14b3982ffe
child 9692 807633f1e3c2
--- a/tests/test-bisect	Sat Jun 13 22:42:13 2009 +0200
+++ b/tests/test-bisect	Sat Jun 13 22:42:15 2009 +0200
@@ -83,6 +83,24 @@
 hg bisect -s 
 hg bisect -g
 
+set +e
+
 echo % test invalid command
 hg bisect -r
 hg bisect --command 'foobar'
+
+echo % test bisecting command
+cat > script.py <<EOF
+#!/usr/bin/env python
+import sys
+from mercurial import ui, hg
+repo = hg.repository(ui.ui(), '.')
+if repo['.'].rev() < 6:
+    sys.exit(1)
+EOF
+chmod +x script.py
+hg bisect -r
+hg bisect --good tip
+hg bisect --bad 0
+hg bisect --command "`pwd`/script.py"
+true