mirror of
https://https.git.savannah.gnu.org/git/coreutils.git
synced 2026-01-26 15:29:07 +00:00
tests: truncate: ensure negative args not parsed as options
* tests/truncate/truncate-parameters.sh: Add a test case.
This commit is contained in:
parent
cb0ab4ef39
commit
77322b3119
@ -51,4 +51,8 @@ test $(stat --format %s file) = 3 || fail=1
|
||||
truncate -r file file2 || fail=1 #file2 now 3
|
||||
test $(stat --format %s file2) = 3 || fail=1
|
||||
|
||||
# Ensure separated argument not parsed as option
|
||||
truncate -s -1 file || fail=1 #file now 2
|
||||
test $(stat --format %s file) = 2 || fail=1
|
||||
|
||||
Exit $fail
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user