forked from ingydotnet/jemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
84 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
VERSION | ||
Version 0.260 | ||
Version 0.261 | ||
|
||
NAME | ||
Jemplate - JavaScript Templating with Template Toolkit | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env perl | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use Test::More; | ||
|
||
BEGIN { | ||
plan skip_all => "JavaScript::V8x::TestMoreish not available" unless eval { require JavaScript::V8x::TestMoreish }; | ||
} | ||
|
||
plan qw/no_plan/; | ||
|
||
use Jemplate; | ||
use Jemplate::Runtime; | ||
|
||
use JavaScript::V8x::TestMoreish; | ||
|
||
my $jemplate = Jemplate->new; | ||
my @js; | ||
|
||
push @js, $jemplate->compile_template_content( <<_END_, 't0' ); | ||
[% BLOCK t1 %][% 3 DIV 2 %][% END %] | ||
[% BLOCK t2 %][% 4 DIV 2 %][% END %] | ||
[% BLOCK t3 %][% 5 DIV 2 %][% END %] | ||
_END_ | ||
|
||
test_js_eval( Jemplate::Runtime->kernel ); | ||
test_js_eval( join "\n", @js, "1;" ); | ||
test_js <<'_END_'; | ||
areEqual( Jemplate.process( 't1' ), 1 ); | ||
areEqual( Jemplate.process( 't2' ), 2 ); | ||
areEqual( Jemplate.process( 't3' ), 2 ); | ||
_END_ |