]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: cut: add test for -z with NUL delimiter and -s flag
authorSylvestre Ledru <sylvestre@debian.org>
Fri, 20 Mar 2026 14:17:40 +0000 (15:17 +0100)
committerPádraig Brady <P@draigBrady.com>
Mon, 23 Mar 2026 12:11:49 +0000 (12:11 +0000)
* tests/cut/cut.pl (zerot-7): New test.
Identified https://github.com/uutils/coreutils/pull/11394
https://github.com/coreutils/coreutils/pull/226

tests/cut/cut.pl

index 7d1315beb3acf4aa103400e1641fe80c38065624..aa445421984499dc02a6c3cf9c1ec1fc0c52f440 100755 (executable)
@@ -171,6 +171,7 @@ my @Tests =
   ['zerot-4', '-z -d:', '-f1', {IN=>"a:1\0b:2"}, {OUT=>"a\0b\0"}],
   ['zerot-5', '-z -d:', '-f1-', {IN=>"a1:\0:"}, {OUT=>"a1:\0:\0"}],
   ['zerot-6', "-z -d ''", '-f1,2', '--ou=:', {IN=>"a\0b\0"}, {OUT=>"a:b\0"}],
+  ['zerot-7', "-z -d '' -s", '-f1', {IN=>"abc"}, {OUT=>""}],
 
   # New functionality:
   ['out-delim1', '-c1-3,5-', '--output-d=:', {IN=>"abcdefg\n"},