Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added template test

  • Loading branch information...
commit 20aca236c86edb30197ac285c3a1864805e91533 1 parent 8a56e2d
@kraih authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 t/mojo/template.t
View
12 t/mojo/template.t
@@ -25,7 +25,7 @@ use warnings;
use utf8;
-use Test::More tests => 137;
+use Test::More tests => 138;
use File::Spec;
use File::Temp;
@@ -807,6 +807,16 @@ $= '2' x 4
EOF
is $output, "<html>2222\n</html>\\\\\\\n", 'different line start';
+# Inline comments
+$mt = Mojo::Template->new;
+$output = $mt->render(<<'EOF');
+% if (1) { # test
+works!
+% } # tset
+great!
+EOF
+is $output, "works!\ngreat!\n", 'comments did not affect the result';
+
# Multiline expression
$mt = Mojo::Template->new;
$output = $mt->render(<<'EOF');
Please sign in to comment.
Something went wrong with that request. Please try again.