When running an external executable I can
- add the path to exec name:
/usr/bin/wc -l - or just use the exec name:
wc -l
The tester has tests that pass only with (1) and tests that pass only with (2)
logs from test
If I put only the executable name on arg#0 I get a failure: ‘ls’ not found (because it is not on the path I think)
[tester::#NY9] Running tests for Stage #NY9 (Pipelines - Pipelines with built-ins)
[tester::#NY9] [setup] export PATH=/tmp/pear/grape/banana:$PATH
[tester::#NY9] Running ./your_program.sh
[your-program] $ echo apple-strawberry | wc
[your-program] 1 1 17
[tester::#NY9] ✓ Received expected output
[your-program] $ ls | type exit
[your-program] exit is a shell builtin
[your-program] sh: 1: ls: not found
[tester::#NY9] ^ Expected prompt ("$ ") but received “sh: 1: ls: not found”
[your-program] $
[tester::#NY9] Assertion failed.
[tester::#NY9] Test failed
If I put the full path of executable on arg#0 I get a failure on another test:
[tester::#IP1] Running tests for Stage #IP1 (Run a program)
[tester::#IP1] [setup] export PATH=/tmp/bee:$PATH
[tester::#IP1] [setup] Available executables:
[tester::#IP1] [setup] - custom_exe_4797
[tester::#IP1] [setup] - custom_exe_6254
[tester::#IP1] Running ./your_program.sh
[your-program] $ custom_exe_4797 James Alice
[your-program] Program was passed 3 args (including program name).
[your-program] Arg #0 (program name): /tmp/bee/custom_exe_4797
[tester::#IP1] ^ Line does not match expected value.
[tester::#IP1] Expected: “Arg #0 (program name): custom_exe_4797”
[tester::#IP1] Received: “Arg #0 (program name): /tmp/bee/custom_exe_4797”