I created the following testing class:
package Test::DB;
When I come to run the test, I get the following output:
t/run.t .. # # Test::DB->connect 1..2 ok 1 - esp_libs_db->can('espDbConnect') not ok 2 - dies when connection file does not exist # Failed test 'dies when connection file does not exist' # at t/tests/Test/DB.pm line 39. # (in Test::DB->connect) # expecting: Regexp ((?-xism:Cannot locate database (test_schema) connection file.)) # found: <FONT color=red size=4 face=arial>ERROR: PM_DB_0004: Cannot locate database (test_schema) connection file.</FONT> at t/tests/Test/DB.pm line 38 # Looks like you failed 1 test of 2. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests Test Summary Report ------------------- t/run.t (Wstat: 256 Tests: 2 Failed: 1) Failed test: 2 Non-zero exit status: 1 Files=1, Tests=2, 3 wallclock secs ( 0.44 usr 0.07 sys + 2.44 cusr 0.43 csys = 3.38 CPU) Result: FAIL
I donβt see why the second test fails when it should clearly skip
source share