Skip to content
Merged
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
2 changes: 1 addition & 1 deletion submit/submit
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def warn_user(msg: str) -> None:


def usage(msg: str) -> NoReturn:
logging.error(f'error: {msg}')
logging.error(f'\n\033[1;31mERROR: {msg}\033[0m\n')
print(f"Type '{sys.argv[0]} --help' to get help.")
exit(1)

Expand Down
8 changes: 4 additions & 4 deletions submit/submit_online.bats
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ setup() {
@test "contest via parameter overrides environment" {
run ./submit -c bestaatniet
assert_failure 1
assert_partial "error: No (valid) contest specified"
assert_partial "ERROR: No (valid) contest specified"

run ./submit --contest=bestaatookniet
assert_failure 1
assert_partial "error: No (valid) contest specified"
assert_partial "ERROR: No (valid) contest specified"
}

@test "hello problem id and name are in help output" {
Expand Down Expand Up @@ -78,14 +78,14 @@ setup() {
cp ../example_problems/hello/submissions/accepted/test-hello.java $BATS_TMPDIR/A.java
run ./submit -p nonexistent -l cpp $BATS_TMPDIR/A.java <<< "n"
assert_failure 1
assert_partial "error: No known problem specified or detected"
assert_partial "ERROR: No known problem specified or detected"
}

@test "non existing language name emits error" {
cp ../example_problems/hello/submissions/accepted/test-hello.java $BATS_TMPDIR/hello.java
run ./submit -p C -l nonexistent $BATS_TMPDIR/hello.java <<< "n"
assert_failure 1
assert_partial "error: No known language specified or detected"
assert_partial "ERROR: No known language specified or detected"
}

@test "detect entry point Java" {
Expand Down
Loading