File tree Expand file tree Collapse file tree 2 files changed +37
-5
lines changed Expand file tree Collapse file tree 2 files changed +37
-5
lines changed Original file line number Diff line number Diff line change @@ -57,14 +57,18 @@ _Thoughtful suggestions will likely result faster & more enthusiastic responses
57
57
58
58
<br >
59
59
60
- ## Testing
60
+ ## Verifying
61
61
62
- Tests currently use Cairo v2.9.2 (included with Scarb v2.9.2).
62
+ The track currently uses Cairo v2.9.2 (included with Scarb v2.9.2).
63
63
64
- To test all exercises, run ` ./bin/verify-exercises ` .
65
- This command will iterate over all exercises and check to see if their exemplar/example implementation passes all the tests.
64
+ To verify all exercises, run ` ./bin/verify-exercises ` .
65
+ This command will iterate over all exercises and check to see if the stub compiles and the exemplar/example implementation passes all the tests.
66
66
67
- To test a single exercise, run ` ./bin/verify-exercises <exercise-slug> ` .
67
+ To verify a single exercise, run ` ./bin/verify-exercises <exercise-slug> ` .
68
+
69
+ # Testing
70
+
71
+ To check whether your solution passes the tests, just run ` ./bin/test <exercise-slug> `
68
72
69
73
### Track linting
70
74
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Synopsis:
4
+ # Test the student's solution.
5
+
6
+ # Example: test two-fer
7
+ # ./bin/test two-fer
8
+
9
+ set -eo pipefail
10
+
11
+ repo=$( git rev-parse --show-toplevel)
12
+
13
+ if (( "$# " != 1 )) ; then
14
+ echo " Error: Incorrect number of arguments. This script requires exactly one argument."
15
+ echo " Expected: './bin/test <exercise-slug>'"
16
+ exit 1
17
+ fi
18
+
19
+ slug=" $1 "
20
+
21
+ exercise_path=" $repo /exercises/*/$slug "
22
+ if [[ ! -d " $exercise_path " ]]; then
23
+ echo " No such exercise $slug "
24
+ exit 1
25
+ fi
26
+
27
+ # Exercism sets a timeout limit for tests
28
+ timeout 20 scarb --manifest-path " $exercise_path /Scarb.toml" cairo-test --include-ignored --test-kind integration || { echo " $slug timed out" ; exit 1; }
You can’t perform that action at this time.
0 commit comments