diff options
author | Bernhard Voelker <mail@bernhard-voelker.de> | 2015-01-20 01:54:55 +0100 |
---|---|---|
committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2015-01-20 01:54:55 +0100 |
commit | cdd21d31a3fdd4ffd7a90fa3b43fb7f1c08d8f6d (patch) | |
tree | 433cdf148fd07e829f4703e27d0097bd18a6da42 | |
parent | 4c795d543908ea4715b3e0bd6c6cf908315936d8 (diff) | |
download | coreutils-cdd21d31a3fdd4ffd7a90fa3b43fb7f1c08d8f6d.tar.xz |
tests: use returns_ function for new split test
* tests/split/record-sep.sh: Use the recently added returns_ function
to simplify the shell syntax in this test. Also remove the redirection
of stdout/stderr to /dev/null as this eases analyzing errors.
-rwxr-xr-x | tests/split/record-sep.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/split/record-sep.sh b/tests/split/record-sep.sh index f41215a45..69eb27fae 100755 --- a/tests/split/record-sep.sh +++ b/tests/split/record-sep.sh @@ -55,23 +55,23 @@ done # # Should fail: '-t' requires an argument -{ split -t </dev/null >/dev/null 2>/dev/null || test $? -ne 1; } && +returns_ 1 split -t </dev/null || { warn_ "-t without argument did not trigger an error" ; fail=1 ; } # should fail: multi-character separator -{ split -txx </dev/null >/dev/null 2>&1 || test $? -ne 1; } && +returns_ 1 split -txx </dev/null || { warn_ "-txx did not trigger an error" ; fail=1 ; } # should fail: different separators used -{ split -ta -tb </dev/null >/dev/null 2>&1 || test $? -ne 1; } && +returns_ 1 split -ta -tb </dev/null || { warn_ "-ta -tb did not trigger an error" ; fail=1 ; } # should fail: different separators used, including default -{ split -t"$NL" -tb </dev/null >/dev/null 2>&1 || test $? -ne 1; } && +returns_ 1 split -t"$NL" -tb </dev/null || { warn_ "-t\$NL -tb did not trigger an error" ; fail=1 ; } # should not fail: same separator used multiple times -split -t: -t: </dev/null >/dev/null 2>&1 || +split -t: -t: </dev/null || { warn_ "-t: -t: triggered an error" ; fail=1 ; } |