Skip to content

Commit

Permalink
Verify single exercise
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom committed May 24, 2024
1 parent 953cce9 commit 2e64f77
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/add-exercise
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Your next steps are:
based on the canonical data at 'https://github.com/exercism/problem-specifications/blob/main/exercises/${slug}/canonical-data.json'
- Any test cases you don't implement, mark them in 'exercises/practice/${slug}/.meta/tests.toml' with "include = false"
- Create the example solution in 'exercises/practice/${slug}/.meta/src/example.art'
- Verify the example solution by running 'bin/verify-exercises-no-docker ${slug}'
- Verify the example solution by running 'bin/verify-exercises ${slug}'
- Create the stub solution in 'exercises/practice/${slug}/src/${slug}.art'
- Update the 'difficulty' value for the exercise's entry in the 'config.json' file
- Validate CI using 'bin/configlet lint' and 'bin/configlet fmt'
Expand Down
11 changes: 8 additions & 3 deletions bin/verify-exercises
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,24 @@
# 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:
# 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
fi
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
Expand Down

0 comments on commit 2e64f77

Please sign in to comment.