X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/fc1490e86f04bef1712a767ff53b4293abdb5aaf..bc3a01aef9a58d5e22137dbcc38fec7abebfdb22:/t/helper/snakify.t diff --git a/t/helper/snakify.t b/t/helper/snakify.t new file mode 100644 index 000000000..2a301bf40 --- /dev/null +++ b/t/helper/snakify.t @@ -0,0 +1,15 @@ +use Test::More tests => 7; + +use strict; + +use lib 't'; + +use SL::Util qw(snakify); + +is(snakify('Hello'), 'hello', 'Hello'); +is(snakify('HelloWorld'), 'hello_world', 'helloWorld'); +is(snakify('HelloWorld_'), 'hello_world_', 'helloWorld_'); +is(snakify('charlieTheUnicorn'), 'charlie_the_unicorn', 'charlieTheUnicorn'); +is(snakify('_CharlieTheUnicorn'), '_charlie_the_unicorn', '_CharlieTheUnicorn'); +is(snakify('HEllo'), 'h_ello', 'HEllo'); +is(snakify('HELlo'), 'h_e_llo', 'HELlo');