From: Nicholas Clark Date: Mon, 7 Nov 2005 15:18:51 +0000 (+0000) Subject: For each test function, test it as is, and with extra data appended X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2cb111f233f83a9022bcbc00bde740bde8d07f5c;p=p5sagit%2Fp5-mst-13.2.git For each test function, test it as is, and with extra data appended after each test character. p4raw-id: //depot/perl@26036 --- diff --git a/t/uni/case.pl b/t/uni/case.pl index f12e482..aad638d 100644 --- a/t/uni/case.pl +++ b/t/uni/case.pl @@ -8,6 +8,18 @@ sub unidump { sub casetest { my ($base, $spec, @funcs) = @_; + # For each provided function run it, and run a version with some extra + # characters afterwards. Use a recylcing symbol, as it doesn't change case. + my $ballast = chr (0x2672) x 3; + @funcs = map {my $f = $_; + ($f, + sub {my $r = $f->($_[0] . $ballast); # Add it before + $r =~ s/$ballast\z//so # Remove it afterwards + or die "'$_[0]' to '$r' mangled"; + $r; # Result with $ballast removed. + }, + )} @funcs; + my $file = File::Spec->catfile(File::Spec->catdir(File::Spec->updir, "lib", "unicore", "To"), "$base.pl");