From 107d7ac4ad63df12abb62812630d48ce7ae9db23 Mon Sep 17 00:00:00 2001 From: miguel Date: Tue, 17 Jan 2023 18:25:01 +0000 Subject: [PATCH] fix(in-back-ground): add check for the nohup command --- sh/tests/in-back-ground_test.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sh/tests/in-back-ground_test.sh b/sh/tests/in-back-ground_test.sh index 1c971ddeb..4b1150f7a 100755 --- a/sh/tests/in-back-ground_test.sh +++ b/sh/tests/in-back-ground_test.sh @@ -27,6 +27,12 @@ challenge_no_output() { expected=$(cd "$1" && bash "$script_dirS"/solutions/in-back-ground.sh) diff <(echo "$submitted") <(echo "$expected") } + +if [[ $(cat $FILENAME | grep 'nohup' | wc -l) -lt 1 ]]; then + echo "The file does not contain the required commands" + exit 1 +fi + challenge . rm output.txt