generated from exercism/generic-test-runner
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Use jq's sort to ensure consistent cross-platform sort behavior
#38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
+10
−10
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
bc1c156
avoid tmp dir creation
0xNeshi ace9dd2
revert run-tests changes
0xNeshi 269cbd5
update run-tests.sh to avoid sorting expected-results
0xNeshi 007dc94
use the same sort util in local machine and on alpine
0xNeshi 7e38d3d
update expected results: ignore leading whitespace when sorting
0xNeshi 50203d8
revert temp changes to run-tests.sh
0xNeshi f82f45f
refactor message sorting logic in bin/run-tests.sh
0xNeshi 70abda1
remove redundant JSON format conversion
0xNeshi 9f6341f
merge main
0xNeshi 319072f
add back missing sorted file mv
0xNeshi 5988ae0
use jq's sort to remove dependence on coreutils
0xNeshi 9e67940
missing newline
0xNeshi bb5d276
revert exit code change
0xNeshi a9f9235
merge main
0xNeshi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "version": 1, | ||
| "status": "fail", | ||
| "message": "year_divisible_by_400_is_leap_year - Panicked with \"assertion failed: `is_leap_year(2000)`.\".\n\nyear_divisible_by_4_and_5_is_still_a_leap_year - Panicked with \"assertion failed: `is_leap_year(1960)`.\".\n\nyear_divisible_by_4_not_divisible_by_100_in_leap_year - Panicked with \"assertion failed: `is_leap_year(1996)`.\".\n\nyear_divisible_by_2_not_divisible_by_4_in_common_year - Panicked with \"assertion failed: `!is_leap_year(1970)`.\".\n\nyear_divisible_by_400_but_not_by_125_is_still_a_leap_year - Panicked with \"assertion failed: `is_leap_year(2400)`.\".\n\nyear_not_divisible_by_4_in_common_year - Panicked with \"assertion failed: `!is_leap_year(2015)`.\".\n\nyear_divisible_by_200_not_divisible_by_400_in_common_year - Panicked with \"assertion failed: `!is_leap_year(1800)`.\".\n\nyear_divisible_by_100_not_divisible_by_400_in_common_year - Panicked with \"assertion failed: `!is_leap_year(2100)`.\".\n\nyear_divisible_by_100_but_not_by_3_is_still_not_a_leap_year - Panicked with \"assertion failed: `!is_leap_year(1900)`.\"." | ||
| "message": "year_divisible_by_100_but_not_by_3_is_still_not_a_leap_year - Panicked with \"assertion failed: `!is_leap_year(1900)`.\".\nyear_divisible_by_100_not_divisible_by_400_in_common_year - Panicked with \"assertion failed: `!is_leap_year(2100)`.\".\nyear_divisible_by_200_not_divisible_by_400_in_common_year - Panicked with \"assertion failed: `!is_leap_year(1800)`.\".\nyear_divisible_by_2_not_divisible_by_4_in_common_year - Panicked with \"assertion failed: `!is_leap_year(1970)`.\".\nyear_divisible_by_400_but_not_by_125_is_still_a_leap_year - Panicked with \"assertion failed: `is_leap_year(2400)`.\".\nyear_divisible_by_400_is_leap_year - Panicked with \"assertion failed: `is_leap_year(2000)`.\".\nyear_divisible_by_4_and_5_is_still_a_leap_year - Panicked with \"assertion failed: `is_leap_year(1960)`.\".\nyear_divisible_by_4_not_divisible_by_100_in_leap_year - Panicked with \"assertion failed: `is_leap_year(1996)`.\".\nyear_not_divisible_by_4_in_common_year - Panicked with \"assertion failed: `!is_leap_year(2015)`.\"." | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "version": 1, | ||
| "status": "error", | ||
| "message": "error[E0006]: Identifier not found.\n --> /tests/leap.cairo:1:11\nuse leap::is_leap_year;\n ^^^^^^^^^^^^" | ||
| "message": "--> /tests/leap.cairo:1:11\n^^^^^^^^^^^^\nerror[E0006]: Identifier not found.\nuse leap::is_leap_year;" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "version": 1, | ||
| "status": "fail", | ||
| "message": "year_divisible_by_100_but_not_by_3_is_still_not_a_leap_year - Panicked with \"assertion failed: `!is_leap_year(1900)`.\".\n\nyear_divisible_by_100_not_divisible_by_400_in_common_year - Panicked with \"assertion failed: `!is_leap_year(2100)`.\".\n\nyear_divisible_by_200_not_divisible_by_400_in_common_year - Panicked with \"assertion failed: `!is_leap_year(1800)`.\"." | ||
| "message": "year_divisible_by_100_but_not_by_3_is_still_not_a_leap_year - Panicked with \"assertion failed: `!is_leap_year(1900)`.\".\nyear_divisible_by_100_not_divisible_by_400_in_common_year - Panicked with \"assertion failed: `!is_leap_year(2100)`.\".\nyear_divisible_by_200_not_divisible_by_400_in_common_year - Panicked with \"assertion failed: `!is_leap_year(1800)`.\"." | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "version": 1, | ||
| "status": "error", | ||
| "message": "\n\n\n\n\n\n ^\n ^\n ^\n ^\n ^\n ^^\n ^^^^^^^^^^^^\nerror[E0006]: Identifier not found.\nerror: Missing token '('.\nerror: Missing token ')'.\nerror: Missing token '{'.\nerror: Skipped tokens. Expected: parameter.\nerror: Unexpected token, expected ':' followed by a type.\nerror: Unknown type.\npub fn leap1236^&gv13n\npub fn leap1236^&gv13n\npub fn leap1236^&gv13n\npub fn leap1236^&gv13n\npub fn leap1236^&gv13n\npub fn leap1236^&gv13n\n --> /src/lib.cairo:1:16\n --> /src/lib.cairo:1:16\n --> /src/lib.cairo:1:23\n --> /src/lib.cairo:1:23\n --> /src/lib.cairo:1:23\n --> /src/lib.cairo:1:23\n --> /tests/leap.cairo:1:11\nuse leap::is_leap_year;" | ||
| "message": "--> /src/lib.cairo:1:16\n--> /src/lib.cairo:1:16\n--> /src/lib.cairo:1:23\n--> /src/lib.cairo:1:23\n--> /src/lib.cairo:1:23\n--> /src/lib.cairo:1:23\n--> /tests/leap.cairo:1:11\n^\n^\n^\n^\n^\n^^\n^^^^^^^^^^^^\nerror: Missing token '('.\nerror: Missing token ')'.\nerror: Missing token '{'.\nerror: Skipped tokens. Expected: parameter.\nerror: Unexpected token, expected ':' followed by a type.\nerror: Unknown type.\nerror[E0006]: Identifier not found.\npub fn leap1236^&gv13n\npub fn leap1236^&gv13n\npub fn leap1236^&gv13n\npub fn leap1236^&gv13n\npub fn leap1236^&gv13n\npub fn leap1236^&gv13n\nuse leap::is_leap_year;" | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works, too :) No need for multiple
jqcommands of shell conditions.Note, this requires
jq1.7+ for theifline. On olderjqversions, you need anelse . endThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requires additional effort to set up
jq1.7+, can do this as part of separate PRThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works on older versions, too. You just need
s/end/else . end/.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the non-1.7 version: