in reply to Testing and system return status

You may be able to reproduce something with that "code", but as given it's not run-able.

That aside, aren't you testing your process return result backwards? By convention system returns 0 for success so your ok test should be something like

ok(0 == system($command), 'CLI should return none zero status');

Update sigh, coffee is not an antidote to cold induced muzzy headedness. Muzzy headed comment struck.

Perl is the programming world's equivalent of English

Replies are listed 'Best First'.
Re^2: Testing and system return status (!backwards)
by tye (Sage) on Sep 10, 2014 at 03:00 UTC

    It would be backward if a passing test was one where the command exited with a "success" status. In this case, passing the test is the command exiting with a "failure" status [which would then pass a "true" value to ok()]. So the test is not backward.

    - tye