author | Brandon Casey <drafnel@gmail.com> | |
Tue, 20 Jul 2010 15:24:47 +0000 (10:24 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 20 Jul 2010 18:37:26 +0000 (11:37 -0700) | ||
commit | 460d562eab00070dfeb54f6ecbf803ad14aed4a5 | |
tree | a65fd62bdd347cf02290db6b3556865405f32cbe | tree | snapshot |
parent | 5f7baac1e34440d3805ef488c97af748f3c20640 | commit | diff |
t/t3700: convert two uses of negation operator '!' to use test_must_fail
These two lines use the negation '!' operator to negate the result of a
simple command. Since these commands do not contain any pipes or other
complexities, the test_must_fail function can be used and is preferred
since it will additionally detect termination due to a signal.
This was noticed because the second use of '!' does not include a space
between the '!' and the opening parens. Ksh interprets this as follows:
!(pattern-list)
Matches anything except one of the given patterns.
Ksh performs a file glob using the pattern-list and then tries to execute
the first file in the list. If a space is added between the '!' and the
open parens, then Ksh will not interpret it as a pattern list, but in this
case, it is preferred to use test_must_fail, so lets do so.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
These two lines use the negation '!' operator to negate the result of a
simple command. Since these commands do not contain any pipes or other
complexities, the test_must_fail function can be used and is preferred
since it will additionally detect termination due to a signal.
This was noticed because the second use of '!' does not include a space
between the '!' and the opening parens. Ksh interprets this as follows:
!(pattern-list)
Matches anything except one of the given patterns.
Ksh performs a file glob using the pattern-list and then tries to execute
the first file in the list. If a space is added between the '!' and the
open parens, then Ksh will not interpret it as a pattern list, but in this
case, it is preferred to use test_must_fail, so lets do so.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3700-add.sh | diff | blob | history |