From 4e26731a01888971d60ea216630de835300a1494 Mon Sep 17 00:00:00 2001 From: Isaac Van Doren <69181572+isaacvando@users.noreply.github.com> Date: Sat, 30 Nov 2024 04:30:35 -0600 Subject: [PATCH] Update dependencies (#19) * Update dependencies * update sed command for sanitization and line numbers in snapshots --- bin/download-dependencies.roc | 11 +++++------ bin/run.sh | 4 ++-- tests/all-fail/all-fail-test.roc | 3 +-- tests/all-fail/expected_results.json | 2 +- tests/partial-fail/expected_results.json | 2 +- tests/partial-fail/partial-fail-test.roc | 3 +-- tests/success/success-test.roc | 3 +-- tests/syntax-error/syntax-error-test.roc | 2 +- 8 files changed, 13 insertions(+), 17 deletions(-) diff --git a/bin/download-dependencies.roc b/bin/download-dependencies.roc index 671b31e..5f46488 100644 --- a/bin/download-dependencies.roc +++ b/bin/download-dependencies.roc @@ -1,11 +1,10 @@ app [main] { - pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.15.0/SlwdbJ-3GR7uBWQo6zlmYWNYOxnvo8r6YABXD-45UOw.tar.br", - isodateOld: "https://github.com/imclerran/roc-isodate/releases/download/v0.5.0/ptg0ElRLlIqsxMDZTTvQHgUSkNrUSymQaGwTfv0UEmk.tar.br", - isodate: "https://github.com/imclerran/roc-isodate/releases/download/v0.5.1/XHx5wx95nuICKpN8sxMwYnCme5oX_YFbJUL1s6D1feU.tar.br", - json: "https://github.com/lukewilliamboswell/roc-json/releases/download/0.10.2/FH4N0Sw-JSFXJfG3j54VEDPtXOoN-6I9v_IA8S18IGk.tar.br", - parser: "https://github.com/lukewilliamboswell/roc-parser/releases/download/0.7.2/1usTzOOACTpnkarBX0ED3gFESzR4ROdAlt1Llf4WFzo.tar.br", + pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.17.0/lZFLstMUCUvd5bjnnpYromZJXkQUrdhbva4xdBInicE.tar.br", + isodate: "https://github.com/Anton-4/roc-isodate/releases/download/0.6.0/_n7UX8f5aFVVIXNa2AtOCvd-dcU-n-fp-0o8d22fyuQ.tar.br", + json: "https://github.com/lukewilliamboswell/roc-json/releases/download/0.11.0/z45Wzc-J39TLNweQUoLw3IGZtkQiEN3lTBv3BXErRjQ.tar.br", + parser: "https://github.com/lukewilliamboswell/roc-parser/releases/download/0.9.0/w8YKp2YAgQt5REYk912HfKAHBjcXsrnvtjI0CBzoAT4.tar.br", rand: "https://github.com/lukewilliamboswell/roc-random/releases/download/0.3.0/hPlOciYUhWMU7BefqNzL89g84-30fTE6l2_6Y3cxIcE.tar.br", - unicode: "https://github.com/roc-lang/unicode/releases/download/0.1.2/vH5iqn04ShmqP-pNemgF773f86COePSqMWHzVGrAKNo.tar.br", + unicode: "https://github.com/roc-lang/unicode/releases/download/0.2.0/odvSckHK9LxWLbsrPmo2s6aQ3bn7C3PALyv0ZI1gAu0.tar.br", } expect Bool.true diff --git a/bin/run.sh b/bin/run.sh index af8c867..723c8a3 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -36,7 +36,7 @@ echo "${slug}: testing..." test_output=$(roc test "${solution_dir%/}/${slug}-test.roc" 2>&1) -# Write the results.json file based on the exit code of the command that was +# Write the results.json file based on the exit code of the command that was # just executed that tested the implementation file if [ $? -eq 0 ]; then jq -n '{version: 1, status: "pass"}' > ${results_file} @@ -44,7 +44,7 @@ else # OPTIONAL: Sanitize the output # In some cases, the test output might be overly verbose, in which case stripping # the unneeded information can be very helpful to the student - sanitized_test_output=$(printf "${test_output}\n" | sed 's/ in [0-9]\+ ms//g') + sanitized_test_output=$(printf "${test_output}\n" | sed -E 's/ in [0-9]+ ms\.?$//g') # OPTIONAL: Manually add colors to the output to help scanning the output for errors # If the test output does not contain colors to help identify failing (or passing) diff --git a/tests/all-fail/all-fail-test.roc b/tests/all-fail/all-fail-test.roc index e8ad2ce..b54015d 100644 --- a/tests/all-fail/all-fail-test.roc +++ b/tests/all-fail/all-fail-test.roc @@ -1,5 +1,4 @@ -app [main] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.15.0/SlwdbJ-3GR7uBWQo6zlmYWNYOxnvo8r6YABXD-45UOw.tar.br" } - +app [main] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.17.0/lZFLstMUCUvd5bjnnpYromZJXkQUrdhbva4xdBInicE.tar.br" } expect 2 + 2 == 5 expect "four" == "five" diff --git a/tests/all-fail/expected_results.json b/tests/all-fail/expected_results.json index 5936dc6..c9545f1 100644 --- a/tests/all-fail/expected_results.json +++ b/tests/all-fail/expected_results.json @@ -1,5 +1,5 @@ { "version": 1, "status": "fail", - "message": "\u001b[1;36m── EXPECT FAILED in tests/all-fail/all-fail-test.roc ───────────────────────────\u001b[0m\n\nThis expectation failed:\n\n\u001b[1;36m4\u001b[0m\u001b[1;36m│\u001b[0m \u001b[37mexpect 2 + 2 == 5\u001b[0m\n \u001b[1;31m^^^^^^^^^^^^^^^^^\u001b[0m\n\n\n\u001b[1;36m── EXPECT FAILED in tests/all-fail/all-fail-test.roc ───────────────────────────\u001b[0m\n\nThis expectation failed:\n\n\u001b[1;36m5\u001b[0m\u001b[1;36m│\u001b[0m \u001b[37mexpect \"four\" == \"five\"\u001b[0m\n \u001b[1;31m^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\n\n\u001b[1;31m2\u001b[0m failed and \u001b[1;32m0\u001b[0m passed." + "message": "\u001b[1;36m── EXPECT FAILED in tests/all-fail/all-fail-test.roc ───────────────────────────\u001b[0m\n\nThis expectation failed:\n\n\u001b[1;36m3\u001b[0m\u001b[1;36m│\u001b[0m \u001b[37mexpect 2 + 2 == 5\u001b[0m\n \u001b[1;31m^^^^^^^^^^^^^^^^^\u001b[0m\n\n\n\u001b[1;36m── EXPECT FAILED in tests/all-fail/all-fail-test.roc ───────────────────────────\u001b[0m\n\nThis expectation failed:\n\n\u001b[1;36m4\u001b[0m\u001b[1;36m│\u001b[0m \u001b[37mexpect \"four\" == \"five\"\u001b[0m\n \u001b[1;31m^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\n\n\u001b[1;31m2\u001b[0m failed and \u001b[1;32m0\u001b[0m passed" } diff --git a/tests/partial-fail/expected_results.json b/tests/partial-fail/expected_results.json index c1330f9..e70f780 100644 --- a/tests/partial-fail/expected_results.json +++ b/tests/partial-fail/expected_results.json @@ -1,5 +1,5 @@ { "version": 1, "status": "fail", - "message": "\u001b[1;36m── EXPECT FAILED in tests/partial-fail/partial-fail-test.roc ───────────────────\u001b[0m\n\nThis expectation failed:\n\n\u001b[1;36m5\u001b[0m\u001b[1;36m│\u001b[0m \u001b[37mexpect \"hello\" == \"good bye\"\u001b[0m\n \u001b[1;31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\n\n\u001b[1;31m1\u001b[0m failed and \u001b[1;32m1\u001b[0m passed." + "message": "\u001b[1;36m── EXPECT FAILED in tests/partial-fail/partial-fail-test.roc ───────────────────\u001b[0m\n\nThis expectation failed:\n\n\u001b[1;36m4\u001b[0m\u001b[1;36m│\u001b[0m \u001b[37mexpect \"hello\" == \"good bye\"\u001b[0m\n \u001b[1;31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\n\n\u001b[1;31m1\u001b[0m failed and \u001b[1;32m1\u001b[0m passed" } diff --git a/tests/partial-fail/partial-fail-test.roc b/tests/partial-fail/partial-fail-test.roc index 0e90802..18abe9c 100644 --- a/tests/partial-fail/partial-fail-test.roc +++ b/tests/partial-fail/partial-fail-test.roc @@ -1,5 +1,4 @@ -app [main] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.15.0/SlwdbJ-3GR7uBWQo6zlmYWNYOxnvo8r6YABXD-45UOw.tar.br" } - +app [main] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.17.0/lZFLstMUCUvd5bjnnpYromZJXkQUrdhbva4xdBInicE.tar.br" } expect 2 + 2 == 4 expect "hello" == "good bye" diff --git a/tests/success/success-test.roc b/tests/success/success-test.roc index 28a5e07..5efa950 100644 --- a/tests/success/success-test.roc +++ b/tests/success/success-test.roc @@ -1,5 +1,4 @@ -app [main] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.15.0/SlwdbJ-3GR7uBWQo6zlmYWNYOxnvo8r6YABXD-45UOw.tar.br" } - +app [main] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.17.0/lZFLstMUCUvd5bjnnpYromZJXkQUrdhbva4xdBInicE.tar.br" } expect 2 + 2 == 4 expect "four" == "four" diff --git a/tests/syntax-error/syntax-error-test.roc b/tests/syntax-error/syntax-error-test.roc index 6a85d90..fafe639 100644 --- a/tests/syntax-error/syntax-error-test.roc +++ b/tests/syntax-error/syntax-error-test.roc @@ -1,4 +1,4 @@ -app [main] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.15.0/SlwdbJ-3GR7uBWQo6zlmYWNYOxnvo8r6YABXD-45UOw.tar.br" } +app [main] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.17.0/lZFLstMUCUvd5bjnnpYromZJXkQUrdhbva4xdBInicE.tar.br" } import (