summaryrefslogtreecommitdiff
path: root/tests/split
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2011-05-20 01:18:28 +0100
committerPádraig Brady <P@draigBrady.com>2011-05-26 00:23:11 +0100
commitbfffa909477924eaaa2a5e20ee44be087b0ac87d (patch)
treebc8a1a5f03840ac4997ef6006086c090e0611bb7 /tests/split
parent6eec064597c2f440c51146cac85dc2326a0e0cda (diff)
downloadcoreutils-bfffa909477924eaaa2a5e20ee44be087b0ac87d.tar.xz
split: diagnose when --filter is used with a chunk number
* src/split.c (main): Exit with a diagnostic if --filter is specified along with a specific chunk number. * test/split/filter: Ensure this combination fails.
Diffstat (limited to 'tests/split')
-rwxr-xr-xtests/split/filter3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/split/filter b/tests/split/filter
index a42c5539e..5bc54581f 100755
--- a/tests/split/filter
+++ b/tests/split/filter
@@ -43,6 +43,9 @@ done
split -e -n 10 --filter='xz > $FILE.xz' /dev/null || fail=1
stat x?? 2>/dev/null && fail=1
+# Ensure this invalid combination is flagged
+split -n 1/2 --filter='true' /dev/null 2>/dev/null && fail=1
+
# Ensure SIGPIPEs sent by the children don't propagate back
# where they would result in a non zero exit from split.
yes | head -n200K | split -b1G --filter='head -c1 >/dev/null' || fail=1