File Coverage

test/html/varerr.htm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 24 24 100.0


line stmt bran cond sub pod time code
1 1     1   12  
  1         3  
  1         208  
2            
3            
4             Some Plain tests for Embperl
5            
6              
7            
8              
9 1     1   7 [$VAR $vara $varb $c $]
  1     1   2  
  1     1   43  
  1         4  
  1         4  
  1         103  
  1         8  
  1         2  
  1         715  
10              
11             Here it starts with some HTML Text

12 1     1   6  
  1     1   3  
  1         61  
  1         7  
  1         2  
  1         38  
13              
14             All values should be undefined:
15              
16             $vara = [+ $vara +]
17             $varb = [+ $varb +]
18             $c = [+ $c +]
19             $d = [+ $d +]
20             $e = [+ $e +]
21              
22              
23             First of all assign a value:
24             [- $vara = '(this is the value in $vara)' -]
25              
26             Now we have some 'Umlaute':
27              
28              
29             [- $varb = "$vara äöü" -]
30              
31             Now lets look what we are getting from this:
32             [+ $vara +] [+ $varb +]
33              
34             And now a and b together: [+ "$vara$varb" +]

35              
36             Here we have some HTML tags within the perl code, Embperl will delete them!
37              
38             [+ $c =
6 + 17 * 3 +]
39              
40             Embperl will also translate HMTL escapes to the right characters i.e. $vara &lt; 6 will get the perl expression $vara < 6:
41              
42             [- $e = 2 -]
43             [+ $d = $e < 6 +]
44              
45             Now they should have a value
46              
47             $vara = [+ $vara +]
48             $varb = [+ $varb +]
49             $c = [+ $c +]
50             $d = [+ $d +]
51             $e = [+ $e +]
52              
53            

Ok.

54              
55              
56            
57