mirror of
https://github.com/coreutils/coreutils.git
synced 2026-10-28 17:54:36 +08:00
tests: nl: check the current section carries over to the next file
* tests/nl/multiple-files.sh: Ensure a footer and a header started in one input file go on in the next one, including stdin. https://github.com/uutils/coreutils/pull/15629 Link: https://github.com/coreutils/coreutils/pull/392
This commit is contained in:
1 parent
d57d8187ca
commit
da597e49b4
1 file changed
+11
@@ -30,4 +30,15 @@ EOF
|
||||
compare exp-out out || fail=1
|
||||
compare exp-err err || fail=1
|
||||
|
||||
# The input files are a single document, so a section goes on
|
||||
# into the next file: a footer started in a goes on in b, and a
|
||||
# header started in b goes on in stdin.
|
||||
printf 'a\n\\:\n' > a || framework_failure_
|
||||
printf 'b\n\\:\\:\\:\n' > b || framework_failure_
|
||||
printf '\\:\\:\nd\n' > c || framework_failure_
|
||||
printf 'c\n' | nl -h a a b - c > out || fail=1
|
||||
printf ' 1\ta\n\n b\n\n 1\tc\n\n 1\td\n' > exp \
|
||||
|| framework_failure_
|
||||
compare exp out || fail=1
|
||||
|
||||
Exit $fail
|
||||
Reference in new issue
Block a user