From 03f03a4ea48f130adc8859f7a11a6fe2cd07480e Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Fri, 24 May 2024 09:35:08 +0200 Subject: [PATCH] Verify single exercise --- bin/verify-exercises | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/verify-exercises b/bin/verify-exercises index 8d31328..1a93da6 100755 --- a/bin/verify-exercises +++ b/bin/verify-exercises @@ -15,11 +15,16 @@ # The path to the solution/example/exemplar files can be found in the exercise's # .meta/config.json file, or possibly inferred from the exercise's directory name. -# Example: -# ./bin/test +# Example: verify all exercises +# ./bin/verify-exercises + +# Example: verify single exercise +# ./bin/verify-exercises two-fer + +slug="${1:-*}" # Verify the Concept Exercises -for concept_exercise_dir in ./exercises/concept/*/; do +for concept_exercise_dir in ./exercises/concept/${slug}/; do if [ -d $concept_exercise_dir ]; then echo "Checking $(basename "${concept_exercise_dir}") exercise..." # TODO: run command to verify that the exemplar solution passes the tests @@ -27,7 +32,7 @@ for concept_exercise_dir in ./exercises/concept/*/; do done # Verify the Practice Exercises -for practice_exercise_dir in ./exercises/practice/*/; do +for practice_exercise_dir in ./exercises/practice/${slug}/; do if [ -d $practice_exercise_dir ]; then echo "Checking $(basename "${practice_exercise_dir}") exercise..." # TODO: run command to verify that the example solution passes the tests