From 9eb5d849d546962308a30404642fbbfba6e88177 Mon Sep 17 00:00:00 2001 From: miguel Date: Thu, 29 Dec 2022 16:26:59 +0000 Subject: [PATCH] fix(hard-conditions): adding test case for nos executable --- sh/tests/hard-conditions/non-ex | 0 sh/tests/hard-conditions/test-hard-conditions.sh | 1 + sh/tests/hard-conditions_test.sh | 8 +++++--- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 sh/tests/hard-conditions/non-ex create mode 100755 sh/tests/hard-conditions/test-hard-conditions.sh diff --git a/sh/tests/hard-conditions/non-ex b/sh/tests/hard-conditions/non-ex new file mode 100644 index 000000000..e69de29bb diff --git a/sh/tests/hard-conditions/test-hard-conditions.sh b/sh/tests/hard-conditions/test-hard-conditions.sh new file mode 100755 index 000000000..b1e4199f1 --- /dev/null +++ b/sh/tests/hard-conditions/test-hard-conditions.sh @@ -0,0 +1 @@ +echo "hello world" diff --git a/sh/tests/hard-conditions_test.sh b/sh/tests/hard-conditions_test.sh index 9503cf464..35a2fc9be 100755 --- a/sh/tests/hard-conditions_test.sh +++ b/sh/tests/hard-conditions_test.sh @@ -5,7 +5,9 @@ set -euo pipefail IFS=' ' script_dirS=$(cd -P "$(dirname "$BASH_SOURCE")" &>/dev/null && pwd) -cd "$script_dirS" -submitted=$(bash "$script_dirS"/student/hard-conditions.sh hard-conditions_test.sh) -expected=$(bash "$script_dirS"/solutions/hard-conditions.sh hard-conditions_test.sh) +submitted=$(bash "$script_dirS"/student/hard-conditions.sh hard-conditions/test-hard-conditions.sh) +expected=$(bash "$script_dirS"/solutions/hard-conditions.sh hard-conditions/test-hard-conditions.sh) +diff <(echo "$submitted") <(echo "$expected") +submitted=$(bash "$script_dirS"/student/hard-conditions.sh hard-conditions/non-ex) +expected=$(bash "$script_dirS"/solutions/hard-conditions.sh hard-conditions/non-ex) diff <(echo "$submitted") <(echo "$expected")