Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions bin/.test-in-docker
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ for slug in $all_slugs; do
# their solution.
cp /tmp/solution/.meta/example.zig "/tmp/solution/${snake}.zig"
bin/run.sh "${slug}" /tmp/solution /tmp/solution > /dev/null
solution_pattern=$(cat /tmp/solution/results.json | jq -r tostring | grep "{\"version\":2,\"status\":\"pass\"")

errors=""

if [ -z "$solution_pattern" ]; then
errors="${errors}\n\nSolution is incorrect:\n$(cat /tmp/solution/results.json | jq -r '.message')"
if ! jq -e '.status == "pass"' /tmp/solution/results.json > /dev/null; then
# A compile error reports at the top level; failing tests report per test.
errors="${errors}\n\nSolution is incorrect:\n$(jq -r '
.message
// ([.tests[]? | select(.status != "pass") | "\(.name):\n\(.message // "no message")"] | join("\n\n"))
' /tmp/solution/results.json)"
local_exit_code=1;
fi

Expand Down
6 changes: 6 additions & 0 deletions exercises/practice/phone-number/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Instructions append

## Invalid numbers

`clean` returns `?[10]u8`, an optional array of ten digits.
Return `null` for a number that cannot be cleaned up.
Loading