]> wagnertech.de Git - mfinanz.git/blobdiff - t/helper/camelify.t
Funktionen 'snakify' und 'camelify' nach SL::Util verschoben, gebugfixt, getestet
[mfinanz.git] / t / helper / camelify.t
diff --git a/t/helper/camelify.t b/t/helper/camelify.t
new file mode 100644 (file)
index 0000000..0b5f8e3
--- /dev/null
@@ -0,0 +1,16 @@
+use Test::More tests => 8;
+
+use strict;
+
+use lib 't';
+
+use SL::Util qw(camelify);
+
+is(camelify('hello'),                'Hello',             'hello');
+is(camelify('hello_world'),          'HelloWorld',        'hello_world');
+is(camelify('hello_world_'),         'HelloWorld_',       'hello_world_');
+is(camelify('charlie_the_unicorn'),  'CharlieTheUnicorn', 'charlie_the_unicorn');
+is(camelify('_charlie_the_unicorn'), 'CharlieTheUnicorn', '_charlie_the_unicorn');
+is(camelify('hello__world'),         'HelloWorld',        'hello__world');
+is(camelify('hELLO'),                'HELLO',             'hELLO');
+is(camelify('hellO_worlD'),          'HellOWorlD',        'hellO_worlD');