]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: nl: check that all files are processed
authorCollin Funk <collin.funk1@gmail.com>
Fri, 6 Feb 2026 08:38:14 +0000 (00:38 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Fri, 6 Feb 2026 23:46:44 +0000 (15:46 -0800)
* tests/misc/nl.sh: Add a test case.

tests/misc/nl.sh

index e1e00d2a2b55b23485c5ca53fd0c5767ead4189e..6c0a354576c258eb26dee99a17c7b58a5c161392 100755 (executable)
@@ -110,4 +110,18 @@ cat <<EOF > exp
 EOF
 compare exp out || fail=1
 
+# Test that all files are processed.
+echo a > file1
+echo b > file2
+returns_ 1 nl file1 missing file2 > out 2> err || fail=1
+cat <<EOF > exp-out || framework_failure_
+     1 a
+     2 b
+EOF
+cat <<EOF > exp-err || framework_failure_
+nl: missing: No such file or directory
+EOF
+compare exp-out out || fail=1
+compare exp-err err || fail=1
+
 Exit $fail