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");