]> wagnertech.de Git - mfinanz.git/blobdiff - t/helper/snakify.t
Funktionen 'snakify' und 'camelify' nach SL::Util verschoben, gebugfixt, getestet
[mfinanz.git] / t / helper / snakify.t
diff --git a/t/helper/snakify.t b/t/helper/snakify.t
new file mode 100644 (file)
index 0000000..2a301bf
--- /dev/null
@@ -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');