From 30f5713edefd62b8e0ca9889114ce26199cccd56 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 29 Oct 2026 21:30:39 +0100 Subject: [PATCH] tests: od: ensure od rejects an output type combined with --strings Reported at https://github.com/uutils/coreutils/issues/15989 * tests/od/od.pl: Add test cases. Link: https://github.com/coreutils/coreutils/pull/429 --- tests/od/od.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/od/od.pl b/tests/od/od.pl index 4ff8553a6..a1d5ddc05 100755 --- a/tests/od/od.pl +++ b/tests/od/od.pl @@ -135,6 +135,13 @@ push @Tests, {IN_PIPE=>""}, {EXIT=>1}, {ERR=>"od: -$_ argument '$INTMAX_OFLOW' too large\n"}]} qw(j N S w); +# Ensure an output type cannot be combined with --strings. +push @Tests, + map {(my $name = $_) =~ tr/- //d; + ["S-type-$name", "--strings=1 $_", {IN=>"a\n"}, {EXIT=>1}, + {ERR=>"$prog: no type may be specified when dumping strings\n"}]} + ('-b', '-c', '-d', '-i', '-l', '-o', '-s', '-x', '-t x1'); + my $save_temps = $ENV{DEBUG}; my $verbose = $ENV{VERBOSE};