mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
tests: nl: ensure nl accepts negative -v and -i values
Reported at https://github.com/uutils/coreutils/issues/15999 * tests/nl/nl.sh: Add test cases. Link: https://github.com/coreutils/coreutils/pull/426
This commit is contained in:
1 parent
c1265262f9
commit
5d793a1521
1 file changed
+9
@@ -142,4 +142,13 @@ printf ' 1\ta\n \n 2\tb\n \n 3\tc\n' >exp \
|
||||
compare exp out || fail=1
|
||||
compare /dev/null err || fail=1
|
||||
|
||||
# Negative -v and -i values are accepted.
|
||||
printf 'a\nb\n' > inp || framework_failure_
|
||||
nl -v -1 inp > out || fail=1
|
||||
printf ' -1\ta\n 0\tb\n' > exp || framework_failure_
|
||||
compare exp out || fail=1
|
||||
nl -v 5 -i -1 inp > out || fail=1
|
||||
printf ' 5\ta\n 4\tb\n' > exp || framework_failure_
|
||||
compare exp out || fail=1
|
||||
|
||||
Exit $fail
|
||||
Reference in new issue
Block a user