33 |
To test PCRE, run pcretest on the file testinput, and compare the output with |
To test PCRE, run pcretest on the file testinput, and compare the output with |
34 |
the contents of testoutput. There should be no differences. For example: |
the contents of testoutput. There should be no differences. For example: |
35 |
|
|
36 |
pcretest testinput /tmp/anything |
pcretest testinput some.file |
37 |
diff /tmp/anything testoutput |
diff some.file testoutput |
38 |
|
|
39 |
Do the same with testinput2, comparing the output with testoutput2, but this |
Do the same with testinput2, comparing the output with testoutput2, but this |
40 |
time using the -i flag for pcretest, i.e. |
time using the -i flag for pcretest, i.e. |
41 |
|
|
42 |
pcretest -i testinput2 /tmp/anything |
pcretest -i testinput2 some.file |
43 |
diff /tmp/anything testoutput2 |
diff some.file testoutput2 |
44 |
|
|
45 |
|
The make target "runtest" runs both these tests, using the file "testtry" to |
46 |
|
store the intermediate output, deleting it at the end if all goes well. |
47 |
|
|
48 |
There are two sets of tests because the first set can also be fed directly into |
There are two sets of tests because the first set can also be fed directly into |
49 |
the perltest program to check that Perl gives the same results. The second set |
the perltest program to check that Perl gives the same results. The second set |