From 939def75f3f57179aef79a60eacb4b035faaa5ba Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 19 Mar 2026 22:25:14 +0100 Subject: [PATCH] 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 --- tests/tr/tr.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/tr/tr.pl b/tests/tr/tr.pl index e07dfa0c7..dc37e5c19 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;