Imported Upstream version 1.05
Angel Abad
11 years ago
10 | 10 | ); |
11 | 11 | |
12 | 12 | |
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( | |
14 | 19 | license => 'perl', |
15 | dist_version => '1.03', | |
20 | dist_version => '1.05', | |
16 | 21 | dist_author => 'Sullivan Beck <sbeck@cpan.org>', |
17 | 22 | module_name => 'Test::Inter', |
18 | 23 | dist_abstract => 'framework for more readable interactive test scripts', |
11 | 11 | Version 1.03 2011-06-28 |
12 | 12 | Missed one of the tests that fail with perl 5.015. |
13 | 13 | |
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 |
0 | 0 | For instructions on installing this, or any other perl module in |
1 | 1 | a UNIX environment, please refer to: |
2 | 2 | |
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- | |
4 | 4 | |
5 | 5 | For instructions in a Windows environment running ActivePerl, |
6 | 6 | refer to one of the following (depending on your version of perl): |
5 | 5 | examples/tests |
6 | 6 | examples/use_ok |
7 | 7 | INSTALL |
8 | internal/build.yaml | |
8 | 9 | lib/Test/Inter.pm |
9 | 10 | lib/Test/Inter.pod |
10 | 11 | LICENSE |
11 | 12 | Makefile.PL |
12 | 13 | MANIFEST This list of files |
14 | META.json | |
13 | 15 | README |
14 | 16 | t/file.1.exp |
15 | 17 | 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 | } |
1 | 1 | abstract: 'framework for more readable interactive test scripts' |
2 | 2 | author: |
3 | 3 | - 'Sullivan Beck <sbeck@cpan.org>' |
4 | build_requires: {} | |
4 | 5 | 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' | |
7 | 9 | license: perl |
8 | 10 | meta-spec: |
9 | 11 | url: http://module-build.sourceforge.net/META-spec-v1.4.html |
12 | 14 | provides: |
13 | 15 | Test::Inter: |
14 | 16 | file: lib/Test/Inter.pm |
15 | version: 1.03 | |
17 | version: 1.05 | |
16 | 18 | requires: |
17 | 19 | File::Basename: 0 |
18 | 20 | IO::File: 0 |
19 | 21 | perl: 5.004 |
20 | 22 | resources: |
21 | 23 | license: http://dev.perl.org/licenses/ |
22 | version: 1.03 | |
24 | version: 1.05 |
10 | 10 | |
11 | 11 | WriteMakefile( |
12 | 12 | NAME => 'Test::Inter', |
13 | VERSION => '1.03', | |
13 | VERSION => '1.05', | |
14 | 14 | ($] >= 5.004 |
15 | 15 | ? (ABSTRACT=>'framework for more readable interactive test scripts', |
16 | 16 | AUTHOR =>'Sullivan Beck (sbeck@cpan.org)') |
103 | 103 | several difficulties with this. |
104 | 104 | |
105 | 105 | 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. | |
118 | 113 | |
119 | 114 | How much better to be able to say: |
120 | 115 | |
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. | |
122 | 122 | |
123 | 123 | Way too much perl interspersed with the tests |
124 | 124 | It's difficult to read the tests individually in this script because |
227 | 227 | |
228 | 228 | start |
229 | 229 | end |
230 | test | |
230 | testnum | |
231 | 231 | plan |
232 | 232 | abort |
233 | 233 | quiet |
982 | 982 | |
983 | 983 | Expected results are separated from arguments by ' => '. |
984 | 984 | |
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 | ||
985 | 1021 | HISTORY |
986 | 1022 | The history of this module dates back to 1996 when I needed to write a |
987 | 1023 | test suite for my Date::Manip module. At that time, none of the Test::* |
12 | 12 | use IO::File; |
13 | 13 | |
14 | 14 | our($VERSION); |
15 | $VERSION = '1.03'; | |
15 | $VERSION = '1.05'; | |
16 | 16 | |
17 | 17 | ############################################################################### |
18 | 18 | # BASE METHODS |
1452 | 1452 | foreach my $v (@val) { |
1453 | 1453 | $v = '' if ($v eq '__blank__'); |
1454 | 1454 | $v = undef if ($v eq '__undef__'); |
1455 | } | |
1455 | $v =~ s/__nl__/\n/g if ($v); | |
1456 | } | |
1456 | 1457 | return (0,$match,@val) if ($found); |
1457 | 1458 | return (0,0); |
1458 | 1459 | } |
1602 | 1603 | # cperl-continued-brace-offset: 0 |
1603 | 1604 | # cperl-brace-offset: 0 |
1604 | 1605 | # cperl-brace-imaginary-offset: 0 |
1605 | # cperl-label-offset: -2 | |
1606 | # cperl-label-offset: 0 | |
1606 | 1607 | # End: |
120 | 120 | |
121 | 121 | =item B<Debugging the script is tedious> |
122 | 122 | |
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. | |
135 | 129 | |
136 | 130 | How much better to be able to say: |
137 | 131 | |
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. | |
139 | 137 | |
140 | 138 | =item B<Way too much perl interspersed with the tests> |
141 | 139 | |
262 | 260 | |
263 | 261 | start |
264 | 262 | end |
265 | test | |
263 | testnum | |
266 | 264 | plan |
267 | 265 | abort |
268 | 266 | quiet |
1069 | 1067 | |
1070 | 1068 | Expected results are separated from arguments by ' => '. |
1071 | 1069 | |
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 | ||
1072 | 1116 | =head1 HISTORY |
1073 | 1117 | |
1074 | 1118 | The history of this module dates back to 1996 when I needed to write a |