diff options
author | Nicholas Clark <nick@ccl4.org> | 2002-04-13 03:58:07 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-04-13 15:25:55 +0000 |
commit | e16e2ff836b177c52744755a35f12e818d01328b (patch) | |
tree | 6e3f0cc3daa15151f159b039b24eac3b86055fa6 /t | |
parent | 0e58dc15c0a761823891aec751111291a7995805 (diff) | |
download | perl-e16e2ff836b177c52744755a35f12e818d01328b.tar.gz |
[dodgy PATCH] Re: [Storable] utf8 keys started working!
Message-ID: <20020413015806.GA371@Bagpuss.unfortu.net>
p4raw-id: //depot/perl@15893
Diffstat (limited to 't')
-rw-r--r-- | t/lib/st-dump.pl | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/t/lib/st-dump.pl b/t/lib/st-dump.pl index 9b1f3d157c..05028f30d8 100644 --- a/t/lib/st-dump.pl +++ b/t/lib/st-dump.pl @@ -11,9 +11,27 @@ ;# sub ok { - my ($num, $ok) = @_; - print "not " unless $ok; - print "ok $num\n"; + my ($num, $ok, $name) = @_; + $num .= " - $name" if defined $name and length $name; + print $ok ? "ok $num\n" : "not ok $num\n"; + $ok; +} + +sub num_equal { + my ($num, $left, $right, $name) = @_; + my $ok = ((defined $left) ? $left == $right : undef); + unless (ok ($num, $ok, $name)) { + print "# Expected $right\n"; + if (!defined $left) { + print "# Got undef\n"; + } elsif ($left !~ tr/0-9//c) { + print "# Got $left\n"; + } else { + $left =~ s/([^-a-zA-Z0-9_+])/sprintf "\\%03o", ord $1/ge; + print "# Got \"$left\"\n"; + } + } + $ok; } package dump; |