]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
test: dirname: add tests for -z master
authorCollin Funk <collin.funk1@gmail.com>
Sun, 2 Aug 2026 18:24:43 +0000 (11:24 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Sun, 2 Aug 2026 18:24:43 +0000 (11:24 -0700)
* tests/misc/dirname.pl (@Tests): Add a few test cases.

tests/misc/dirname.pl

index 0b79cdee9b2557e3efb5f717e5e0d5bf3fa7bf68..0c31da666270d1ab7b0d776445e07936114eebf3 100755 (executable)
@@ -59,6 +59,10 @@ my @Tests =
      ['q-invalid', q{'q name/f'}, {ENV => 'QUOTING_STYLE=invalid'},
       {OUT => 'q name'}],
 
+     # Exercise -z option.
+     ['z0', qw(-z a/b),       {OUT => "a\0"}],
+     ['z1', qw(--zero a/b),   {OUT => "a\0"}],
+     ['z2', qw(-z a/b b/a),    {OUT => "a\0b\0"}],
      ['z-quote', q{-z 'q name/f'}, {ENV => 'QUOTING_STYLE=invalid'},
       {OUT => "q name\0"}],
     );