File: parse40-white-space.t

package info (click to toggle)
libje-perl 0.066-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,008 kB
  • sloc: perl: 31,288; makefile: 2
file content (37 lines) | stat: -rw-r--r-- 824 bytes parent folder | download | duplicates (6)
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
32
33
34
35
36
37
#!perl -T

use Test::More tests => 12;
use strict;
use utf8;

#--------------------------------------------------------------------#
# Test 1: See if the module loads

BEGIN { use_ok('JE') };

#--------------------------------------------------------------------#
# Test 2: Parse code

my $j = new JE;

isa_ok( my $code = $j->parse( <<"--end--" ), 'JE::Code') or diag $@;
/* comment at start of code */var\tt4\ck=\f4//comment
var t5\xa0=\x{2001}5/*
*/var\nt6\r=\x{2028}6
var\x{2029}t7=7

t8=8\nt9=9\rt10=10\x{2028}t11=11\x{2029}t12=12


--end--

#--------------------------------------------------------------------#
# Test 3: Run code

$code->execute;
is($@, '', 'execute code');

#--------------------------------------------------------------------#
# Tests 4-12: Check side-effects

is( $j->prop("t$_"), $_ ) for 4..12;