Skip to content

Commit

Permalink
no Test::Base;
Browse files Browse the repository at this point in the history
  • Loading branch information
tokuhirom committed Nov 7, 2011
1 parent a697586 commit ea9b4ff
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Build.PL
Expand Up @@ -6,7 +6,7 @@ my $build = Module::Build->new(
license => 'perl',
recursive_test_files => 1,
dynamic_config => 0,
build_requires => { 'Test::More' => '0.98', 'Test::Base' => 0 },
build_requires => { 'Test::More' => '0.98' },
configure_requires => { 'Module::Build' => '0.38' },
requires => {
'Filter::Util::Call' => '0',
Expand Down
59 changes: 30 additions & 29 deletions t/01_simple.t
@@ -1,15 +1,41 @@
use strict;
use warnings;
use utf8;
use Test::Base;
use Test::More;
use Template;
use Encode;

# 鬱膣愛味噌

filters {
input => [qw/yaml escape/],
};
my @tests = (
+{
input => {
template =>
"[% USE MobileJPPictogram %][% x | pictogram_charname('***%s***') %]",
x => 'PICT:\x{E754}',
},
expected => 'PICT:***ウマ***'
},
{
input => {
template => q{[% USE MobileJPPictogram %][% x | pictogram_unicode('<img src="/img/pictogram/%04X.gif" />') %]},
x => q!PICT:\x{E754}!,
},
expected => q{PICT:<img src="/img/pictogram/E754.gif" />},
},
{
input => {
template => q{[% USE MobileJPPictogram %][% x | pictogram_unicode('<img src="/img/pictogram/%d.gif" />') %]},
x => q!PICT:\x{E754}!,
},
expected => q{PICT:<img src="/img/pictogram/59220.gif" />},
},
);

plan tests => 0+@tests;
for (@tests) {
is(escape($_->{input}), $_->{expected}, $_->{expected});
}

sub decode_uni {
local $_ = shift;
Expand All @@ -24,29 +50,4 @@ sub escape {
$out;
}

run_is input => 'expected';

__END__
===
--- input
template: "[% USE MobileJPPictogram %][% x | pictogram_charname('***%s***') %]"
x: PICT:\x{E754}
--- expected: PICT:***ウマ***
===
--- input
template: |+
[% USE MobileJPPictogram %][% x | pictogram_unicode('<img src="/img/pictogram/%04X.gif" />') %]
x: PICT:\x{E754}
--- expected
PICT:<img src="/img/pictogram/E754.gif" />
===
--- input
template: |+
[% USE MobileJPPictogram %][% x | pictogram_unicode('<img src="/img/pictogram/%d.gif" />') %]
x: PICT:\x{E754}
--- expected
PICT:<img src="/img/pictogram/59220.gif" />

0 comments on commit ea9b4ff

Please sign in to comment.