diff --git a/tests/test-bisect b/tests/test-bisect
index ca14b3982ffe6bfc5c692d79f6f31bfea13b8f70_dGVzdHMvdGVzdC1iaXNlY3Q=..2b35ced86b69479cc894462bcc6f2933e05b26f5_dGVzdHMvdGVzdC1iaXNlY3Q= 100755
--- a/tests/test-bisect
+++ b/tests/test-bisect
@@ -83,6 +83,8 @@
 hg bisect -s 
 hg bisect -g
 
+set +e
+
 echo % test invalid command
 hg bisect -r
 hg bisect --command 'foobar'
@@ -86,3 +88,19 @@
 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
diff --git a/tests/test-bisect.out b/tests/test-bisect.out
index ca14b3982ffe6bfc5c692d79f6f31bfea13b8f70_dGVzdHMvdGVzdC1iaXNlY3Qub3V0..2b35ced86b69479cc894462bcc6f2933e05b26f5_dGVzdHMvdGVzdC1iaXNlY3Qub3V0 100644
--- a/tests/test-bisect.out
+++ b/tests/test-bisect.out
@@ -305,3 +305,12 @@
 
 % test invalid command
 abort: cannot find executable: foobar
+% test bisecting command
+Testing changeset 15:e7fa0811edb0 (31 changesets remaining, ~4 tests)
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+The first good revision is:
+changeset:   6:a3d5c6fdf0d3
+user:        test
+date:        Thu Jan 01 00:00:06 1970 +0000
+summary:     msg 6
+