diff --git a/tests.old/Exit on fail if -e is passed. b/tests/Flags/-e,--exit-on-fail similarity index 68% rename from tests.old/Exit on fail if -e is passed. rename to tests/Flags/-e,--exit-on-fail index d9c3d22..32c5ab7 100755 --- a/tests.old/Exit on fail if -e is passed. +++ b/tests/Flags/-e,--exit-on-fail @@ -1,11 +1,11 @@ -tmp=$(mktemp) -../urchin -e -f ./.die-on-fail > $tmp +#!/bin/sh + +../../urchin -e ./.test_-e,--exit-on-fail > $tmp result=$? +set -e grep '1 should run.' $tmp grep '2 should run.' $tmp grep -v '3 should not run.' $tmp grep -v '4 should not run.' $tmp - -rm $tmp exit $result diff --git a/tests.old/.die-on-fail/1 should run. b/tests/Flags/.test_-e,--exit-on-fail/.urchin old mode 100755 new mode 100644 similarity index 100% rename from tests.old/.die-on-fail/1 should run. rename to tests/Flags/.test_-e,--exit-on-fail/.urchin diff --git a/tests/Flags/.test_-e,--exit-on-fail/1 should run. b/tests/Flags/.test_-e,--exit-on-fail/1 should run. new file mode 100755 index 0000000..e69de29 diff --git a/tests.old/.die-on-fail/2 should run. b/tests/Flags/.test_-e,--exit-on-fail/2 should run. similarity index 100% rename from tests.old/.die-on-fail/2 should run. rename to tests/Flags/.test_-e,--exit-on-fail/2 should run. diff --git a/tests.old/.die-on-fail/3 should not run. b/tests/Flags/.test_-e,--exit-on-fail/3 should not run. similarity index 100% rename from tests.old/.die-on-fail/3 should not run. rename to tests/Flags/.test_-e,--exit-on-fail/3 should not run. diff --git a/tests.old/.die-on-fail/4 should not run. b/tests/Flags/.test_-e,--exit-on-fail/4 should not run. similarity index 100% rename from tests.old/.die-on-fail/4 should not run. rename to tests/Flags/.test_-e,--exit-on-fail/4 should not run. diff --git a/tests/Flags/setup b/tests/Flags/setup new file mode 100644 index 0000000..e01b6ff --- /dev/null +++ b/tests/Flags/setup @@ -0,0 +1 @@ +export tmp=$(mktemp) diff --git a/tests/Flags/teardown b/tests/Flags/teardown new file mode 100644 index 0000000..1069296 --- /dev/null +++ b/tests/Flags/teardown @@ -0,0 +1 @@ +rm $tmp diff --git a/urchin b/urchin index eff4da3..5de2b74 100755 --- a/urchin +++ b/urchin @@ -492,7 +492,7 @@ fi # Run or present the Molly guard. root="$(urchin_root "$1")" if basename "$(fullpath "$root")" | - grep -Fi 'test' > /dev/null || $force; then + grep -i 'test' > /dev/null || $force; then start=$(date +%s) set +e