in reply to document your test files
That way the needed "oh, this failed? here's extra info..." can be immediately apparent, and don't have to perldoc the test file or dig for comments in the test file's source ..diag diag(@diagnostic_message); Prints a diagnostic message which is guaranteed not to inte +rfere with test output. Like "print" @diagnostic_message is simply concatenated together +. Handy for this sort of thing: ok( grep(/foo/, @users), "There's a foo user" ) or diag("Since there's no foo, check that /etc/bar is +set up right"); which would produce: not ok 42 - There's a foo user # Failed test 'There's a foo user' # in foo.t at line 52. # Since there's no foo, check that /etc/bar is set up r +ight.
|
|---|