Mercurial > hg
changeset 8803:2b35ced86b69
test-bisect: test --command option
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 13 Jun 2009 22:42:15 +0200 |
parents | ca14b3982ffe |
children | 820723a4bd17 |
files | tests/test-bisect tests/test-bisect.out |
diffstat | 2 files changed, 27 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- a/tests/test-bisect.out Sat Jun 13 22:42:13 2009 +0200 +++ b/tests/test-bisect.out Sat Jun 13 22:42:15 2009 +0200 @@ -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 +