From: Sylvestre Ledru Date: Thu, 19 Mar 2026 21:25:14 +0000 (+0100) Subject: tests: tr: add test for invalid character class name X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=939def75f3f57179aef79a60eacb4b035faaa5ba;p=thirdparty%2Fcoreutils.git tests: tr: add test for invalid character class name * tests/tr/tr.pl (invalid-class): New test. Identified : https://github.com/uutils/coreutils/pull/11398 https://github.com/coreutils/coreutils/pull/225 --- diff --git a/tests/tr/tr.pl b/tests/tr/tr.pl index e07dfa0c72..dc37e5c199 100755 --- a/tests/tr/tr.pl +++ b/tests/tr/tr.pl @@ -158,6 +158,10 @@ my @Tests = # Up to coreutils-6.9, this would provoke a failed assertion. ['no-abort-1', qw(-c a '[b*256]'), {IN=>'abc'}, {OUT=>'abb'}], + + # Reject unknown character class name. + ['invalid-class', qw('[:fooclass:]' x), {IN=>'abc'}, {OUT=>''}, {EXIT=>1}, + {ERR=>"$prog: invalid character class 'fooclass'\n"}], ); @Tests = triple_test \@Tests;