line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
## |
2
|
|
|
|
|
|
|
# name: TestML::Script |
3
|
|
|
|
|
|
|
# abstract: Support for running TestML as a script |
4
|
|
|
|
|
|
|
# author: Ingy döt Net |
5
|
|
|
|
|
|
|
# license: perl |
6
|
|
|
|
|
|
|
# copyright: 2011 |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
2219
|
use 5.008003; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
50
|
|
9
|
1
|
|
|
1
|
|
838
|
use TestML 0.22 (); |
|
1
|
|
|
|
|
5159
|
|
|
1
|
|
|
|
|
49
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
package TestML::Script; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
866
|
use TestML::Runtime; |
|
1
|
|
|
|
|
45933
|
|
|
1
|
|
|
|
|
39
|
|
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
512
|
use XXX; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub run { |
20
|
|
|
|
|
|
|
my $class = shift; |
21
|
|
|
|
|
|
|
my $script = shift; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
local @ARGV = @_; |
24
|
|
|
|
|
|
|
my $runtime = TestML::Runtime->new( |
25
|
|
|
|
|
|
|
base => '', |
26
|
|
|
|
|
|
|
testml => $script, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
$runtime->run(); |
29
|
|
|
|
|
|
|
exit 0; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 SYNOPSIS |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
#!/usr/bin/env testml |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
%TestML 1.0 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Print("Hello, world"); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 DESCRIPTION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
TestML is a computer programming language for writing Acmeist unit tests (unit |
45
|
|
|
|
|
|
|
tests that run under any programming language and any test framework). |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
This module will let you run TestML as a standalone script. |