Share

ShUnit

Tracker: Bugs

5 1.5 AcceptanceTests fail on Mac OS X when using sh - ID: 2309847
Last Update: Comment added ( brozow )

When running the acceptence tests under sh on Mac OS X using /bin/sh the
shUnitAcceptanceTest produces many failures

However the tests all run fine under bash on Mac OS X.

$ ./shUnitAcceptanceTest
Available shells: -n sh
-n bash

****** shUnitAcceptanceTest ******
9 tests to run:
Test 1: TestNoTest .E...E..
"Expected 'shUnit: No tests to run' with -n" failed.
"Expected 'shUnit: No tests to run' with -n" failed.
Test 2: Test1SuccessfulTest ./shUnitAcceptanceTest: line 183: -n:
command not found
EEE..../shUnitAcceptanceTest: line 183: -n: command not found
EEE...
"Expected exit code 0 with -n" failed.
"Expected '1 test succeeded.' with -n" failed.
"Expected 'No tests failed.' with -n" failed.
"Expected exit code 0 with -n" failed.
"Expected '1 test succeeded.' with -n" failed.
"Expected 'No tests failed.' with -n" failed.
Test 3: Test1FailingTest ./shUnitAcceptanceTest: line 183: -n:
command not found
EEE..../shUnitAcceptanceTest: line 183: -n: command not found
EEE...
"Expected exit code 1 with -n" failed.
"Expected 'No tests succeeded.' with -n" failed.
"Expected '1 test failed.' with -n" failed.
"Expected exit code 1 with -n" failed.
"Expected 'No tests succeeded.' with -n" failed.
"Expected '1 test failed.' with -n" failed.
Test 4: Test2SuccessfulTests ./shUnitAcceptanceTest: line 183: -n:
command not found
EEE..../shUnitAcceptanceTest: line 183: -n: command not found
EEE...
"Expected exit code 0 with -n" failed.
"Expected '2 tests succeeded.' with -n" failed.
"Expected 'No tests failed.' with -n" failed.
"Expected exit code 0 with -n" failed.
"Expected '2 tests succeeded.' with -n" failed.
"Expected 'No tests failed.' with -n" failed.
Test 5: Test1SuccessAnd1FailureInTheSameTest ./shUnitAcceptanceTest:
line 183: -n: command not found
EEE..../shUnitAcceptanceTest: line 183: -n: command not found
EEE...
"Expected exit code 1 with -n" failed.
"Expected 'No tests succeeded.' with -n" failed.
"Expected '1 test failed.' with -n" failed.
"Expected exit code 1 with -n" failed.
"Expected 'No tests succeeded.' with -n" failed.
"Expected '1 test failed.' with -n" failed.
Test 6: Test1SuccessAnd1FailureInDifferentTests
./shUnitAcceptanceTest: line 183: -n: command not found
EEE..../shUnitAcceptanceTest: line 183: -n: command not found
EEE...
"Expected exit code 1 with -n" failed.
"Expected '1 test succeeded.' with -n" failed.
"Expected '1 test failed.' with -n" failed.
"Expected exit code 1 with -n" failed.
"Expected '1 test succeeded.' with -n" failed.
"Expected '1 test failed.' with -n" failed.
Test 7: Test126FailingTests ./shUnitAcceptanceTest: line 183: -n:
command not found
E../shUnitAcceptanceTest: line 183: -n: command not found
E.
"Expected exit code 126 with -n" failed.
"Expected exit code 126 with -n" failed.
Test 8: Test127FailingTests ./shUnitAcceptanceTest: line 183: -n:
command not found
E../shUnitAcceptanceTest: line 183: -n: command not found
E.
"Expected exit code 126 with -n" failed.
"Expected exit code 126 with -n" failed.
Test 9: TestShuStartWith2Arguments ..E.....E...
"Error message for -n" failed.
"Error message for -n" failed.

9 tests run.
No tests succeeded.
9 tests failed.




Matt Brozowski ( brozow ) - 2008-11-18 16:13

5

Open

None

Nobody/Anonymous

None

None

Public


Comment ( 1 )




Date: 2008-11-18 16:16
Sender: brozow

Looks like the problem is with echo -n

on sh echo -n sh produces = '-n sh'

changing the echo /bin/echo fixed the tests



Log in to comment.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.