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
3 changes: 2 additions & 1 deletion bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ popd > /dev/null
if [ $exit_code -eq 0 ] && [ $error -eq 0 ]; then
jq -n '{version: 1, status: "pass"}' > ${results_file}
else
sanitized_test_output=$(echo "${test_output}" | sed -E -e 's/-+ Error -+//g' -e '/./,$!d' -e '/Phase: /q;p')
# Removed /q;p and replaced with /q
sanitized_test_output=$(echo "${test_output}" | sed -E -e 's/-+ Error -+//g' -e '/./,$!d' -e '/Phase: /q')

jq -n --arg output "${sanitized_test_output}" '{version: 1, status: "fail", message: $output}' > ${results_file}
fi
Expand Down
4 changes: 2 additions & 2 deletions tests/example-all-fail/expected_results.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"status": "fail",
"message": "Testing example-all-fail-test\nTesting example-all-fail-test\n\n\nERROR in (year-not-divisible-by-4) (:13:9)\nERROR in (year-not-divisible-by-4) (:13:9)\nexpected: (not (example-all-fail/leap-year? 2999))\nexpected: (not (example-all-fail/leap-year? 2999))\n actual: #object[Error Error: Cannot call false as a function.]\n actual: #object[Error Error: Cannot call false as a function.]\n\n\nERROR in (year-divisible-by-2-but-not-4) (:17:9)\nERROR in (year-divisible-by-2-but-not-4) (:17:9)\nexpected: (not (example-all-fail/leap-year? 1658))\nexpected: (not (example-all-fail/leap-year? 1658))\n actual: #object[Error Error: Cannot call false as a function.]\n actual: #object[Error Error: Cannot call false as a function.]\n\n\nERROR in (year-divisible-by-4-but-not-100) (:21:9)\nERROR in (year-divisible-by-4-but-not-100) (:21:9)\nexpected: (example-all-fail/leap-year? 2004)\nexpected: (example-all-fail/leap-year? 2004)\n actual: #object[Error Error: Cannot call true as a function.]\n actual: #object[Error Error: Cannot call true as a function.]\n\n\nERROR in (year-divisible-by-4-and-5) (:25:9)\nERROR in (year-divisible-by-4-and-5) (:25:9)\nexpected: (example-all-fail/leap-year? 2020)\nexpected: (example-all-fail/leap-year? 2020)\n actual: #object[Error Error: Cannot call true as a function.]\n actual: #object[Error Error: Cannot call true as a function.]\n\n\nERROR in (year-divisible-by-100-but-not-400) (:29:9)\nERROR in (year-divisible-by-100-but-not-400) (:29:9)\nexpected: (not (example-all-fail/leap-year? 2200))\nexpected: (not (example-all-fail/leap-year? 2200))\n actual: #object[Error Error: Cannot call false as a function.]\n actual: #object[Error Error: Cannot call false as a function.]\n\n\nERROR in (year-divisible-by-100-but-not-by-3) (:33:9)\nERROR in (year-divisible-by-100-but-not-by-3) (:33:9)\nexpected: (not (example-all-fail/leap-year? 2500))\nexpected: (not (example-all-fail/leap-year? 2500))\n actual: #object[Error Error: Cannot call false as a function.]\n actual: #object[Error Error: Cannot call false as a function.]\n\n\nERROR in (year-divisible-by-400) (:37:9)\nERROR in (year-divisible-by-400) (:37:9)\nexpected: (example-all-fail/leap-year? 2800)\nexpected: (example-all-fail/leap-year? 2800)\n actual: #object[Error Error: Cannot call true as a function.]\n actual: #object[Error Error: Cannot call true as a function.]\n\n\nERROR in (year-divisible-by-400-but-not-125) (:41:9)\nERROR in (year-divisible-by-400-but-not-125) (:41:9)\nexpected: (example-all-fail/leap-year? 3200)\nexpected: (example-all-fail/leap-year? 3200)\n actual: #object[Error Error: Cannot call true as a function.]\n actual: #object[Error Error: Cannot call true as a function.]\n\n\nERROR in (year-divisible-by-200-but-not-by-400) (:45:9)\nERROR in (year-divisible-by-200-but-not-by-400) (:45:9)\nexpected: (not (example-all-fail/leap-year? 2900))\nexpected: (not (example-all-fail/leap-year? 2900))\n actual: #object[Error Error: Cannot call false as a function.]\n actual: #object[Error Error: Cannot call false as a function.]\n\n\nRan 9 tests containing 9 assertions.\nRan 9 tests containing 9 assertions.\n0 failures, 9 errors.\n0 failures, 9 errors."
}
"message": "Testing example-all-fail-test\n\nERROR in (year-not-divisible-by-4) (:13:9)\nexpected: (not (example-all-fail/leap-year? 2999))\n actual: #object[Error Error: Cannot call false as a function.]\n\nERROR in (year-divisible-by-2-but-not-4) (:17:9)\nexpected: (not (example-all-fail/leap-year? 1658))\n actual: #object[Error Error: Cannot call false as a function.]\n actual: #object[Error Error: Cannot call false as a function.]\n\n\nERROR in (year-divisible-by-4-but-not-100) (:21:9)\nERROR in (year-divisible-by-4-but-not-100) (:21:9)\nexpected: (example-all-fail/leap-year? 2004)\nexpected: (example-all-fail/leap-year? 2004)\n actual: #object[Error Error: Cannot call true as a function.]\n actual: #object[Error Error: Cannot call true as a function.]\n\n\nERROR in (year-divisible-by-4-and-5) (:25:9)\nERROR in (year-divisible-by-4-and-5) (:25:9)\nexpected: (example-all-fail/leap-year? 2020)\nexpected: (example-all-fail/leap-year? 2020)\n actual: #object[Error Error: Cannot call true as a function.]\n actual: #object[Error Error: Cannot call true as a function.]\n\n\nERROR in (year-divisible-by-100-but-not-400) (:29:9)\nERROR in (year-divisible-by-100-but-not-400) (:29:9)\nexpected: (not (example-all-fail/leap-year? 2200))\nexpected: (not (example-all-fail/leap-year? 2200))\n actual: #object[Error Error: Cannot call false as a function.]\n actual: #object[Error Error: Cannot call false as a function.]\n\n\nERROR in (year-divisible-by-100-but-not-by-3) (:33:9)\nERROR in (year-divisible-by-100-but-not-by-3) (:33:9)\nexpected: (not (example-all-fail/leap-year? 2500))\nexpected: (not (example-all-fail/leap-year? 2500))\n actual: #object[Error Error: Cannot call false as a function.]\n actual: #object[Error Error: Cannot call false as a function.]\n\n\nERROR in (year-divisible-by-400) (:37:9)\nERROR in (year-divisible-by-400) (:37:9)\nexpected: (example-all-fail/leap-year? 2800)\nexpected: (example-all-fail/leap-year? 2800)\n actual: #object[Error Error: Cannot call true as a function.]\n actual: #object[Error Error: Cannot call true as a function.]\n\n\nERROR in (year-divisible-by-400-but-not-125) (:41:9)\nERROR in (year-divisible-by-400-but-not-125) (:41:9)\nexpected: (example-all-fail/leap-year? 3200)\nexpected: (example-all-fail/leap-year? 3200)\n actual: #object[Error Error: Cannot call true as a function.]\n actual: #object[Error Error: Cannot call true as a function.]\n\n\nERROR in (year-divisible-by-200-but-not-by-400) (:45:9)\nERROR in (year-divisible-by-200-but-not-by-400) (:45:9)\nexpected: (not (example-all-fail/leap-year? 2900))\nexpected: (not (example-all-fail/leap-year? 2900))\n actual: #object[Error Error: Cannot call false as a function.]\n\nRan 9 tests containing 9 assertions.\n0 failures, 9 errors."
}
4 changes: 2 additions & 2 deletions tests/example-empty-file/expected_results.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"status": "fail",
"message": "Message: Could not find namespace: example-empty-file\nMessage: Could not find namespace: example-empty-file"
}
"message": "Message: Could not find namespace: example-empty-file"
}
4 changes: 2 additions & 2 deletions tests/example-partial-fail/expected_results.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"status": "fail",
"message": "Testing example-partial-fail-test\nTesting example-partial-fail-test\n\n\nFAIL in (year-divisible-by-400) (:37)\nFAIL in (year-divisible-by-400) (:37)\nexpected: (example-partial-fail/leap-year? 2800)\nexpected: (example-partial-fail/leap-year? 2800)\n actual: (not (example-partial-fail/leap-year? 2800))\n actual: (not (example-partial-fail/leap-year? 2800))\n\n\nFAIL in (year-divisible-by-400-but-not-125) (:41)\nFAIL in (year-divisible-by-400-but-not-125) (:41)\nexpected: (example-partial-fail/leap-year? 3200)\nexpected: (example-partial-fail/leap-year? 3200)\n actual: (not (example-partial-fail/leap-year? 3200))\n actual: (not (example-partial-fail/leap-year? 3200))\n\n\nRan 9 tests containing 9 assertions.\nRan 9 tests containing 9 assertions.\n2 failures, 0 errors.\n2 failures, 0 errors."
}
"message": "Testing example-partial-fail-test\n\nFAIL in (year-divisible-by-400) (:37)\nexpected: (example-partial-fail/leap-year? 2800)\n actual: (not (example-partial-fail/leap-year? 2800))\n\nFAIL in (year-divisible-by-400-but-not-125) (:41)\nexpected: (example-partial-fail/leap-year? 3200)\n actual: (not (example-partial-fail/leap-year? 3200))\n\nRan 9 tests containing 9 assertions.\n2 failures, 0 errors."
}
4 changes: 2 additions & 2 deletions tests/example-syntax-error/expected_results.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"status": "fail",
"message": "Message: Could not resolve symbol: leap\nMessage: Could not resolve symbol: leap\nLocation: 1:14\nLocation: 1:14\nPhase: analysis"
}
"message": "Message: Could not resolve symbol: leap\nLocation: 1:14\nPhase: analysis"
}