Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: case insensitive deep comparison

by davido (Cardinal)
on Jun 25, 2015 at 02:46 UTC ( [id://1131887]=note: print w/replies, xml ) Need Help??


in reply to case insensitive deep comparison

cmp_deeply may be recursive, but lc isn't. I haven't used Test::Deeply enough to know if cmp_deeply has the ability to accept a comparator callback. If it could, that would make the solution pretty straightforward, but if it can, the documentation doesn't make it apparent. ...something like this would be great:

my $result = cmp_deeply( $expected, $actual, sub { lc shift eq lc shift }, "This is a test using a callback to compare. );

Dave

Replies are listed 'Best First'.
Re^2: case insensitive deep comparison
by robby_dobby (Hermit) on Jun 25, 2015 at 03:10 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1131887]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-03-28 21:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found