tests for -e, --exit-on-fail
This commit is contained in:
parent
b6706fcc00
commit
22e4ff4cc3
@ -1,11 +1,11 @@
|
|||||||
tmp=$(mktemp)
|
#!/bin/sh
|
||||||
../urchin -e -f ./.die-on-fail > $tmp
|
|
||||||
|
../../urchin -e ./.test_-e,--exit-on-fail > $tmp
|
||||||
result=$?
|
result=$?
|
||||||
|
|
||||||
|
set -e
|
||||||
grep '1 should run.' $tmp
|
grep '1 should run.' $tmp
|
||||||
grep '2 should run.' $tmp
|
grep '2 should run.' $tmp
|
||||||
grep -v '3 should not run.' $tmp
|
grep -v '3 should not run.' $tmp
|
||||||
grep -v '4 should not run.' $tmp
|
grep -v '4 should not run.' $tmp
|
||||||
|
|
||||||
rm $tmp
|
|
||||||
exit $result
|
exit $result
|
0
tests.old/.die-on-fail/1 should run. → tests/Flags/.test_-e,--exit-on-fail/.urchin
Executable file → Normal file
0
tests.old/.die-on-fail/1 should run. → tests/Flags/.test_-e,--exit-on-fail/.urchin
Executable file → Normal file
0
tests/Flags/.test_-e,--exit-on-fail/1 should run.
Executable file
0
tests/Flags/.test_-e,--exit-on-fail/1 should run.
Executable file
1
tests/Flags/setup
Normal file
1
tests/Flags/setup
Normal file
@ -0,0 +1 @@
|
|||||||
|
export tmp=$(mktemp)
|
1
tests/Flags/teardown
Normal file
1
tests/Flags/teardown
Normal file
@ -0,0 +1 @@
|
|||||||
|
rm $tmp
|
2
urchin
2
urchin
@ -492,7 +492,7 @@ fi
|
|||||||
# Run or present the Molly guard.
|
# Run or present the Molly guard.
|
||||||
root="$(urchin_root "$1")"
|
root="$(urchin_root "$1")"
|
||||||
if basename "$(fullpath "$root")" |
|
if basename "$(fullpath "$root")" |
|
||||||
grep -Fi 'test' > /dev/null || $force; then
|
grep -i 'test' > /dev/null || $force; then
|
||||||
|
|
||||||
start=$(date +%s)
|
start=$(date +%s)
|
||||||
set +e
|
set +e
|
||||||
|
Loading…
Reference in New Issue
Block a user