unit testing - Why do my Perl module tests fail when I run them with Test::Harness::runtests? -
I have a test script for a module when test scripts themselves run, it works as expected We need to run several tests, so I have created a file that runs all the scripts. However, the script returns when executing with runtests
.
During debugging, I tried to run the script using Baitics and it worked because the Runtest command caused the errors
The code of exploitation is very straightforward:
(pearl) -w be tough; Use warnings; Test :: Use Use; My @Tests = ('test1.pl', 'test2.pl', 'test3.pl'); Runtests (@tests);
Errors arising from a cpan module we use,
The solution I am hoping for is a way to run without errors
Output from the test:
Test 1 .......... false [] in the range "\ w-" regex; Marked by row 20. Use the unrecognized value on string in /app/perl/lib/Pod/HtmlEasy/Parser.pm line 422, line 20. string in ne / app / perl / lib / pod / HtmlEasy / Parser.pm line 363, line 22. False [] range "\ w-" in regex; Marked by line 22. Use Line 24 on the line /app/perl/lib/Pod/HtmlEasy/Parser.pm line 488 in string NE, line 24. On string ne / app / perl / lib / pod / HtmlEasy / Parser.pm line 363, line 26. Off /) On / Off / Off / PDI / PP / HTMEPPM 24 hours on line Use uninitialized value (.) Or in string / app / perl /lib/Pod/HtmlEasy.pm line 318. (...) uninitialized value using concatenation (.) Or string in / app / perl / lib / pod / HtmlEasy.pm line 396. test1 ...... .... OK 2 / 3close () without opening the file headlined podin on /app/perl/lib/Pod/HtmlEasy.pm line 248. Using unstructured value in combination (.) Or use the uninitialized value in the string / ap / pearl / lib / pod /HtmlEasy.pm line 318. (...) or /app/perl/lib/Pod/HtmlEasy.pm in line 396 String on Test1 .......... OK
Your adhesive output passes your tests Shows ng Output messages are warning I if you do not receive warnings while running perl test1.pl
, it is because you (or modules you are using) have not enabled warnings Apparently Test :: Harness calls with the Pearl-W flag, and you get warnings, because -w enables warnings globally ("use precautions" only they A. Enables literal scope that uses "warnings".)
Comments
Post a Comment