author | Junio C Hamano <gitster@pobox.com> | |
Mon, 9 Feb 2009 21:39:52 +0000 (13:39 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 11 Feb 2009 06:25:25 +0000 (22:25 -0800) | ||
commit | 2f33415563a4e4deb45d88f71fdd8963793b5c0c | |
tree | 1b496248de28ca3e2d52ded1b750c139cc54ec22 | tree | snapshot |
parent | 0ab9a8bbfe2af693444a8c9dd3afddeac08f5274 | commit | diff |
Modernize t5400 test script
Many tests checked for failure by hand without using test_must_fail (they
probably predate the shell function).
When we know the desired outcome, explicitly check for it, instead of
checking if the result does not match one possible incorrect outcome.
E.g. if you expect a push to be refused, you do not test if the result is
different from what was pushed. Instead, make sure that the ref did not
before and after the push.
The test sequence chdir'ed around and any failure at one point could have
started the next test in an unexpected directory. Fix this problem by
using subshells as necessary.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Many tests checked for failure by hand without using test_must_fail (they
probably predate the shell function).
When we know the desired outcome, explicitly check for it, instead of
checking if the result does not match one possible incorrect outcome.
E.g. if you expect a push to be refused, you do not test if the result is
different from what was pushed. Instead, make sure that the ref did not
before and after the push.
The test sequence chdir'ed around and any failure at one point could have
started the next test in an unexpected directory. Fix this problem by
using subshells as necessary.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5400-send-pack.sh | diff | blob | history |