From ba723772098e6bebcfdb97187f53d8260afb37ef Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 24 Aug 2014 15:53:35 -0400 Subject: [PATCH] Unit Tests - feature.exit.t was not properly converting the return value from a system() call to an exit status. --- test/feature.exit.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/feature.exit.t b/test/feature.exit.t index 2c18442ab..e1a23ff34 100755 --- a/test/feature.exit.t +++ b/test/feature.exit.t @@ -42,9 +42,9 @@ if (open my $fh, '>', 'exit.rc') } qx{../src/task rc:exit.rc add foo 2>&1}; -my $exit_good = system ('../src/task rc:exit.rc ls /foo/ >/dev/null 2>&1'); +my $exit_good = system ('../src/task rc:exit.rc ls /foo/ >/dev/null 2>&1') >> 8; is ($exit_good, 0, 'task returns 0 on success'); -my $exit_bad = system ('../src/task rc:exit.rc ls /bar/ >/dev/null 2>&1'); +my $exit_bad = system ('../src/task rc:exit.rc ls /bar/ >/dev/null 2>&1') >> 8; isnt ($exit_bad, 0, 'task returns non-zero on failure'); # Cleanup.