Bug 13223: [QA Follow-up] Adding some unit tests for wrapper
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Thu, 13 Nov 2014 22:06:00 +0000 (23:06 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 19 Nov 2014 16:28:28 +0000 (13:28 -0300)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Trivially amended. Thanks, Katrin.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
t/Koha_Util_FrameworkPlugin.t [new file with mode: 0755]

diff --git a/t/Koha_Util_FrameworkPlugin.t b/t/Koha_Util_FrameworkPlugin.t
new file mode 100755 (executable)
index 0000000..20f941c
--- /dev/null
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+use Modern::Perl;
+use Test::More tests => 6;
+
+use_ok( 'Koha::Util::FrameworkPlugin', qw(wrapper) );
+
+my $char;
+is($char=wrapper(' '),'space',"Return space");
+is($char=wrapper('  '),'dblspace',"Return dblspace");
+is($char=wrapper('|'),'pipe',"Return pipe");
+is($char=wrapper('||'),'dblpipe',"Return dblpipe");
+is($char=wrapper('somethingelse'),'somethingelse',"Return somethingelse");