Permalink
Browse files

no Test::Base;

  • Loading branch information...
1 parent a697586 commit ea9b4ff28addc7738f27b4406d90df54d8d6f6ae @tokuhirom committed Nov 7, 2011
Showing with 31 additions and 30 deletions.
  1. +1 −1 Build.PL
  2. +30 −29 t/01_simple.t
View
@@ -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',
View
@@ -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;
@@ -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.