From 6599a9be7cf6c1e008afa12955fcc89dd849f846 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Thu, 13 Nov 2014 23:06:00 +0100 Subject: [PATCH] Bug 13223: Follow-up - Adding some unit tests --- t/Koha_Util_FrameworkPlugin.t | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 t/Koha_Util_FrameworkPlugin.t diff --git a/t/Koha_Util_FrameworkPlugin.t b/t/Koha_Util_FrameworkPlugin.t new file mode 100755 index 0000000..4f9cc24 --- /dev/null +++ b/t/Koha_Util_FrameworkPlugin.t @@ -0,0 +1,18 @@ +#!/usr/bin/perl + +use Modern::Perl; +use Koha::Util::FrameworkPlugin qw(wrapper); +use Test::More tests => 6; +use t::lib::Mocks; + +BEGIN { + use_ok('Koha::Util::FrameworkPlugin'); +} + +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"); + -- 1.9.1