File: 06a-compiler_obj.t

package info (click to toggle)
libhtml-mason-perl 1%3A1.39-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,072 kB
  • ctags: 1,535
  • sloc: perl: 17,624; sh: 187; makefile: 12
file content (31 lines) | stat: -rw-r--r-- 658 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/perl -w

use strict;
use HTML::Mason;
use Test;
plan tests => 4;

ok 1;  # Loaded

# We use the Interp class as a front-end to the compiler, but we're
# really testing the compiler here.  We could change this to eliminate
# the Interp stuff, probably.

my $interp = HTML::Mason::Interp->new;
ok $interp;

# Make sure the compiler can recover properly after a syntax error
eval {$interp->make_component( comp_source => <<'EOF' )};
  <&| syntax_error, in => "this" &>
    component
  </&|>
EOF
ok $@, qr{ending tag};

eval {$interp->make_component( comp_source => <<'EOF' )};
  <&| syntax_error, in => "this" &>
    component
  </&>
EOF
ok $@, '';