Codebase list libtest-inter-perl / 38a69d5
Imported Upstream version 1.05 Angel Abad 11 years ago
11 changed file(s) with 182 addition(s) and 40 deletion(s). Raw diff Collapse all Expand all
1010 );
1111
1212
13 my $build = Module::Build->new(
13 my $class = Module::Build->subclass(
14 class => "Module::Build::Custom",
15 code => q { sub ACTION_html { my $self = shift ; $self->SUPER::ACTION_html ( @_ ) if ( $ENV{ MAKE_HTML } ) ; } }
16 );
17
18 my $build = $class->new(
1419 license => 'perl',
15 dist_version => '1.03',
20 dist_version => '1.05',
1621 dist_author => 'Sullivan Beck <sbeck@cpan.org>',
1722 module_name => 'Test::Inter',
1823 dist_abstract => 'framework for more readable interactive test scripts',
1111 Version 1.03 2011-06-28
1212 Missed one of the tests that fail with perl 5.015.
1313
14 Version 1.04
14 Version 1.04 2013-03-18
15 The __nl__ substitution wasn't happening.
16
17 Version 1.05 2013-03-20
18 Fixed the Build.PL/Makefile.PL scripts to not install the example scripts. RT 84091
19
00 For instructions on installing this, or any other perl module in
11 a UNIX environment, please refer to:
22
3 http://faq.perl.org/perlfaq8.html#How_do_I_install_a_m
3 http://learn.perl.org/faq/perlfaq8.html#How-do-I-install-a-module-from-CPAN-
44
55 For instructions in a Windows environment running ActivePerl,
66 refer to one of the following (depending on your version of perl):
55 examples/tests
66 examples/use_ok
77 INSTALL
8 internal/build.yaml
89 lib/Test/Inter.pm
910 lib/Test/Inter.pod
1011 LICENSE
1112 Makefile.PL
1213 MANIFEST This list of files
14 META.json
1315 README
1416 t/file.1.exp
1517 t/file.2.exp
0 {
1 "abstract" : "framework for more readable interactive test scripts",
2 "author" : [
3 "Sullivan Beck <sbeck@cpan.org>"
4 ],
5 "dynamic_config" : 1,
6 "generated_by" : "Module::Build version 0.3901, CPAN::Meta::Converter version 2.120921",
7 "license" : [
8 "perl_5"
9 ],
10 "meta-spec" : {
11 "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
12 "version" : "2"
13 },
14 "name" : "Test-Inter",
15 "prereqs" : {
16 "configure" : {
17 "requires" : {
18 "Module::Build" : "0.39"
19 }
20 },
21 "runtime" : {
22 "requires" : {
23 "File::Basename" : "0",
24 "IO::File" : "0",
25 "perl" : "5.004"
26 }
27 }
28 },
29 "provides" : {
30 "Test::Inter" : {
31 "file" : "lib/Test/Inter.pm",
32 "version" : "1.05"
33 }
34 },
35 "release_status" : "stable",
36 "resources" : {
37 "license" : [
38 "http://dev.perl.org/licenses/"
39 ]
40 },
41 "version" : "1.05"
42 }
11 abstract: 'framework for more readable interactive test scripts'
22 author:
33 - 'Sullivan Beck <sbeck@cpan.org>'
4 build_requires: {}
45 configure_requires:
5 Module::Build: 0.36
6 generated_by: 'Module::Build version 0.3603'
6 Module::Build: 0.39
7 dynamic_config: 1
8 generated_by: 'Module::Build version 0.3901, CPAN::Meta::Converter version 2.120921'
79 license: perl
810 meta-spec:
911 url: http://module-build.sourceforge.net/META-spec-v1.4.html
1214 provides:
1315 Test::Inter:
1416 file: lib/Test/Inter.pm
15 version: 1.03
17 version: 1.05
1618 requires:
1719 File::Basename: 0
1820 IO::File: 0
1921 perl: 5.004
2022 resources:
2123 license: http://dev.perl.org/licenses/
22 version: 1.03
24 version: 1.05
1010
1111 WriteMakefile(
1212 NAME => 'Test::Inter',
13 VERSION => '1.03',
13 VERSION => '1.05',
1414 ($] >= 5.004
1515 ? (ABSTRACT=>'framework for more readable interactive test scripts',
1616 AUTHOR =>'Sullivan Beck (sbeck@cpan.org)')
103103 several difficulties with this.
104104
105105 Debugging the script is tedious
106 To debug the 3rd test, I've got to do the following steps:
107
108 get the line number of the 3rd func call
109 set a breakpoint for it
110 run the program
111 wait for the first two tests to complete
112 step into the function
113
114 None of these steps are hard of course, but even so, getting to the
115 first line of the test requires several steps which tend to break up
116 your chain of thought when you want to be thinking exclusively about
117 debugging the test.
106 To debug the 3rd test, you have to open up the file and get the line
107 number of the 3rd test. You set a breakpoint there and then you can
108 run the script.
109
110 It's typically not very hard to do this, but if you have to check
111 out the line number every time you want to visit a test, it can
112 break your chain of thought.
118113
119114 How much better to be able to say:
120115
121 break in func when testnum==3
116 break func ($::TI_NUM==3)
117
118 It would also be nice to be able to skip the first two tests...
119 perhaps they take a long time to run, and I want to get right to
120 work on test 3. You can do this easily too by setting the
121 $::TI_START variable.
122122
123123 Way too much perl interspersed with the tests
124124 It's difficult to read the tests individually in this script because
227227
228228 start
229229 end
230 test
230 testnum
231231 plan
232232 abort
233233 quiet
982982
983983 Expected results are separated from arguments by ' => '.
984984
985 ENVIRONMENT VARIABLES
986 To summarize the information above, the following environment variables
987 (and main:: variables) exist. Each can be set in a perl script as a
988 variable in the main namespace:
989
990 $::TI_END
991
992 or as an environment variable:
993
994 $ENV{TI_END}
995
996 TI_START
997 Set this to define the test you want to start with.
998
999 Example: If you have a perl test script (my_test_script) and you
1000 want to start running it at test 12, run the following shell
1001 commands:
1002
1003 TI_START=12
1004 ./my_test_script.t
1005
1006 TI_END
1007 Set this to define the test you want to end with.
1008
1009 TI_TESTNUM
1010 Set this to run only a single test
1011
1012 TI_QUIET
1013 How verbose the test script is.
1014
1015 TI_MODE
1016 How the output is formatted.
1017
1018 TI_WIDTH
1019 The width of the terminal.
1020
9851021 HISTORY
9861022 The history of this module dates back to 1996 when I needed to write a
9871023 test suite for my Date::Manip module. At that time, none of the Test::*
0 ---
1 script:
2 examples: 0
3
1212 use IO::File;
1313
1414 our($VERSION);
15 $VERSION = '1.03';
15 $VERSION = '1.05';
1616
1717 ###############################################################################
1818 # BASE METHODS
14521452 foreach my $v (@val) {
14531453 $v = '' if ($v eq '__blank__');
14541454 $v = undef if ($v eq '__undef__');
1455 }
1455 $v =~ s/__nl__/\n/g if ($v);
1456 }
14561457 return (0,$match,@val) if ($found);
14571458 return (0,0);
14581459 }
16021603 # cperl-continued-brace-offset: 0
16031604 # cperl-brace-offset: 0
16041605 # cperl-brace-imaginary-offset: 0
1605 # cperl-label-offset: -2
1606 # cperl-label-offset: 0
16061607 # End:
120120
121121 =item B<Debugging the script is tedious>
122122
123 To debug the 3rd test, I've got to do the following steps:
124
125 get the line number of the 3rd func call
126 set a breakpoint for it
127 run the program
128 wait for the first two tests to complete
129 step into the function
130
131 None of these steps are hard of course, but even so, getting to the
132 first line of the test requires several steps which tend to break up
133 your chain of thought when you want to be thinking exclusively about
134 debugging the test.
123 To debug the 3rd test, you have to open up the file and get the line number
124 of the 3rd test. You set a breakpoint there and then you can run the script.
125
126 It's typically not very hard to do this, but if you have to check out the line
127 number every time you want to visit a test, it can break your chain of
128 thought.
135129
136130 How much better to be able to say:
137131
138 break in func when testnum==3
132 break func ($::TI_NUM==3)
133
134 It would also be nice to be able to skip the first two tests... perhaps
135 they take a long time to run, and I want to get right to work on test 3.
136 You can do this easily too by setting the $::TI_START variable.
139137
140138 =item B<Way too much perl interspersed with the tests>
141139
262260
263261 start
264262 end
265 test
263 testnum
266264 plan
267265 abort
268266 quiet
10691067
10701068 Expected results are separated from arguments by ' => '.
10711069
1070 =head1 ENVIRONMENT VARIABLES
1071
1072 To summarize the information above, the following environment variables
1073 (and main:: variables) exist. Each can be set in a perl script as
1074 a variable in the main namespace:
1075
1076 $::TI_END
1077
1078 or as an environment variable:
1079
1080 $ENV{TI_END}
1081
1082 =over 4
1083
1084 =item TI_START
1085
1086 Set this to define the test you want to start with.
1087
1088 Example: If you have a perl test script (my_test_script) and you want
1089 to start running it at test 12, run the following shell commands:
1090
1091 TI_START=12
1092 ./my_test_script.t
1093
1094 =item TI_END
1095
1096 Set this to define the test you want to end with.
1097
1098 =item TI_TESTNUM
1099
1100 Set this to run only a single test
1101
1102 =item TI_QUIET
1103
1104 How verbose the test script is.
1105
1106 =item TI_MODE
1107
1108 How the output is formatted.
1109
1110 =item TI_WIDTH
1111
1112 The width of the terminal.
1113
1114 =back
1115
10721116 =head1 HISTORY
10731117
10741118 The history of this module dates back to 1996 when I needed to write a