File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,14 @@ function digest_template() {
11
11
echo " $template " | sed ' s/${\([^}]*\)\}\$/$(echo $case | jq -r ' \' ' .\1' \' ' )/g'
12
12
}
13
13
14
+ message " info" " Generating tests.."
14
15
canonical_json=$( cat canonical_data.json)
15
16
SLUG=$( echo " $canonical_json " | jq ' .exercise' )
16
17
# shellcheck disable=SC2001
17
18
# Remove double quotes
18
19
SLUG=$( echo " $SLUG " | sed ' s/"//g' )
19
20
EXERCISE_DIR=" exercises/practice/$SLUG "
20
21
TEST_FILE=" $EXERCISE_DIR /tests/$SLUG .rs"
21
- rm " $TEST_FILE "
22
22
23
23
cat << EOT >"$TEST_FILE "
24
24
use $( dash_to_underscore " $SLUG " ) ::*;
@@ -46,3 +46,5 @@ jq -c '.[]' <<<"$cases" | while read -r case; do
46
46
done
47
47
48
48
rustfmt " $TEST_FILE "
49
+
50
+ message " success" " Generated tests successfully! Check out ${TEST_FILE} "
You can’t perform that action at this time.
0 commit comments