diff options
author | Jeff King <peff@peff.net> | 2015-03-20 06:09:22 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-20 10:20:15 -0700 |
commit | 0a5e3c50de60c73782f1add9eb8d1e8dc8eabcb8 (patch) | |
tree | 9f94c217fd91f07949de921a9b05d498e3d4291d /t/t9300-fast-import.sh | |
parent | a167ece0c8cd9470427f8e9a1b43b27303eefa75 (diff) | |
download | git-0a5e3c50de60c73782f1add9eb8d1e8dc8eabcb8.tar.gz |
t: use test_must_fail instead of hand-rolled blocks
These test scripts likely predate test_must_fail, and can be
made simpler by using it (in addition to making them pass
--chain-lint).
The case in t6036 loses some verbosity in the failure case,
but it is so tied to a specific failure mode that it is not
worth keeping around (and the outcome of the test is not
affected at all).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9300-fast-import.sh')
-rwxr-xr-x | t/t9300-fast-import.sh | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 584b5383d8..aac126fd57 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -2853,8 +2853,8 @@ test_expect_success 'S: notemodify with garbage after mark commit-ish must fail' # from # test_expect_success 'S: from with garbage after mark must fail' ' - # no && - git fast-import --import-marks=marks --export-marks=marks <<-EOF 2>err + test_must_fail \ + git fast-import --import-marks=marks --export-marks=marks <<-EOF 2>err && commit refs/heads/S2 mark :303 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE @@ -2865,9 +2865,6 @@ test_expect_success 'S: from with garbage after mark must fail' ' M 100644 :403 hello.c EOF - ret=$? && - echo returned $ret && - test $ret -ne 0 && # failed, but it created the commit # go create the commit, need it for merge test git fast-import --import-marks=marks --export-marks=marks <<-EOF && |