diff --git a/bin/run.sh b/bin/run.sh index a2f524d..df83b05 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -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 diff --git a/tests/example-all-fail/expected_results.json b/tests/example-all-fail/expected_results.json index 55a222b..79b2644 100644 --- a/tests/example-all-fail/expected_results.json +++ b/tests/example-all-fail/expected_results.json @@ -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." +} \ No newline at end of file diff --git a/tests/example-empty-file/expected_results.json b/tests/example-empty-file/expected_results.json index 4ef9a34..d103b32 100644 --- a/tests/example-empty-file/expected_results.json +++ b/tests/example-empty-file/expected_results.json @@ -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" +} \ No newline at end of file diff --git a/tests/example-partial-fail/expected_results.json b/tests/example-partial-fail/expected_results.json index 0dda7ac..11d9cc2 100644 --- a/tests/example-partial-fail/expected_results.json +++ b/tests/example-partial-fail/expected_results.json @@ -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." +} \ No newline at end of file diff --git a/tests/example-syntax-error/expected_results.json b/tests/example-syntax-error/expected_results.json index 0144cc5..87b4deb 100644 --- a/tests/example-syntax-error/expected_results.json +++ b/tests/example-syntax-error/expected_results.json @@ -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" +} \ No newline at end of file