-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from ReCodEx/judge-improvements
Adding new judge feature -- remove trailing whitespace.
- Loading branch information
Showing
8 changed files
with
61 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,7 +1,12 @@ | ||
0 | ||
-1: first row 42 | ||
+2: first | ||
3: unexpected 'row' | ||
+4: 42 pzr | ||
-4: kzr pzr # this is the end | ||
+5: kzr | ||
0 | ||
-1: first row 42 | ||
|
||
+2: first | ||
|
||
3: unexpected 'row' | ||
+4: 42 pzr | ||
|
||
-4: kzr pzr | ||
|
||
+5: kzr | ||
|
15 changes: 15 additions & 0 deletions
15
judges/recodex_token_judge/tests/12-trailing-whitespace.bats
This file contains 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bats | ||
|
||
load bats-shared | ||
|
||
@test "ignore trailing whitespace" { | ||
run $EXE_FILE --ignore-trailing-whitespace $CORRECT_FILE $RESULT_FILE | ||
[ "$status" -eq 0 ] | ||
[ "${lines[0]}" -eq 1 ] | ||
} | ||
|
||
@test "ignore trailing whitespace (negative test)" { | ||
run $EXE_FILE $CORRECT_FILE $RESULT_FILE | ||
[ "$status" -eq 1 ] | ||
echo "$output" | diff -abB - $ERROR_FILE | ||
} |
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
9 5 4 1 2 3 6 7 8 10 |
This file contains 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
0 | ||
+2: | ||
+3: | ||
+4: |
This file contains 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
9 5 4 1 2 3 6 7 8 10 | ||
|
||
|
||
|