]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: cut: add test case for newline delimiter with -s flag
authorSylvestre Ledru <sylvestre@debian.org>
Wed, 4 Mar 2026 10:57:10 +0000 (11:57 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 4 Mar 2026 12:18:34 +0000 (12:18 +0000)
* tests/cut/cut.pl: Add a new test case.
https://github.com/coreutils/coreutils/pull/211

tests/cut/cut.pl

index 22f40b1024c1808c259d91032ac0ad8aace3f61f..7d1315beb3acf4aa103400e1641fe80c38065624 100755 (executable)
@@ -161,6 +161,9 @@ my @Tests =
   ['newline-23', "-d'\n'", '-f1-', '--ou=:', {IN=>"a\nb\n"}, {OUT=>"a:b\n"}],
   ['newline-24', "-d'\n'", '-f1,2', '--ou=:', {IN=>"a\nb\n"}, {OUT=>"a:b\n"}],
 
+  # input without delimiter and -s flag
+  ['newline-25', '-s', "-d'\n'", '-f1', {IN=>"abc"}, {OUT=>""}],
+
   # --zero-terminated
   ['zerot-1', "-z", '-c1', {IN=>"ab\0cd\0"}, {OUT=>"a\0c\0"}],
   ['zerot-2', "-z", '-c1', {IN=>"ab\0cd"}, {OUT=>"a\0c\0"}],