]> Tony Duckles's Git Repositories (git.nynim.org) - svn2svn.git/commit
test-lib: test_expect_failure() expected failure is ok
authorTony Duckles <tony@nynim.org>
Fri, 10 Aug 2012 03:26:07 +0000 (22:26 -0500)
committerTony Duckles <tony@nynim.org>
Fri, 10 Aug 2012 03:52:57 +0000 (22:52 -0500)
commite8ebacab6957d0b3227158539203fb70c284bbac
tree5c6d4bfebcb10fd649e636f693840a1e0d130bd0
parent59fbff5cfdb597fba2b9d90d68ddb23ed4fd2174
test-lib: test_expect_failure() expected failure is ok

The Git test-lib test_expect_failure() behavior is to call separate
test_known_ok/test_known_broken_failure helper tags which puts the
"known failure" results into separate buckets. This is the opposite
of what I want. I want test_expect_failure() to be the true-opposite
of test_expect_success(): if we expect a test to fail (i.e. exit 1),
then say the test passed if the command failed.

* tests/test-lib-functions.sh (test_expect_failure): Change
  test_expect_failure() to be the true-opposite of
  test_expect_success(): test succeeds if command exits with error
  code.
tests/test-lib-functions.sh