File Coverage

test/html/rawinput/rawinput.htm
Criterion Covered Total %
statement 64 64 100.0
branch n/a
condition 5 10 50.0
subroutine 4 4 100.0
pod n/a
total 73 78 93.5


line stmt bran cond sub pod time code
1 1     1   11  
  1         2  
  1         172  
2            
3            
4 1     1   3 Some Plain tests for Embperl using optRawInput
  1         2  
5            
6 1         17  
7            
8              
9             Here it starts with some HTML Text

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

33              
34             Here we have some HTML tags within the perl code,
35             Embperl will not delete them when optRawInput is set !
36              
37 1         6 [+ $c = "
6 + 17 * 3" +]
38              
39             Here we have something which looks like a HTML tag, but does not start with
40             a character, Embperl does not change them!
41              
42 1         5 [+ "SELECT * FROM a ORDER BY b USING <; Hi There>" +]
43              
44             Embperl will not translate HMTL escapes to the right characters
45             when optRawInput is set
46              
47 1         1 [- $e = 2 -]
48 1         2 [+ $d = "$e < 6" +]
  1         2  
  1         7  
49              
50 1         18 Now they should have a value
51              
52 1         10 $a = [+ $a +]
53 1         4 $b = [+ $b +]
54 1         3 $c = [+ $c +]
55 1         4 $d = [+ $d +]
56 1         5 $e = [+ $e +]
57              
58            

Ok.

59              
60              
61 1         5 optRawInput is now: [+ $optRawInput +]
62 1         5 optRawInput is set now to: [+ $optRawInput = 1 +]
63 1         4 optRawInput is now: [+ $optRawInput +]
64              
65 1         4 [+ $c = "
6 + 17 * 3" +]
66              
67 1         2 [- $b = "$a
68 1         2 äöü" -]
  1         4  
69              
70             Now lets look what we are getting from this:
71 1         21 $a = [+ $a +]
  1         4  
72 1         4 $b = [+ $b +]
73 1         3 $c = [+ $c +]
74              
75 1         3 optRawInput is now: [+ $optRawInput +]
76 1         5 optRawInput is set now to: [+ $optRawInput = 0 +]
77 1         4 optRawInput is now: [+ $optRawInput +]
78              
79 1         5 [+ $c = "
6 + 17 * 3" +]
80              
81 1         1 [- $b = "$a
82 1         2 äöü" -]
  1         2  
83              
84             Now lets look what we are getting from this:
85 1         15 $a = [+ $a +]
  1         5  
86 1         3 $b = [+ $b +]
87 1         3 $c = [+ $c +]
88              
89 1         1  
90            
91 1         2209