Skip to content

Commit 3fb688b

Browse files
committed
DONTMERGE: implement integration test
1 parent 872a504 commit 3fb688b

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.github/jobs/baseinstall.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,6 @@ elif [ "$version" = "all" ]; then
140140
fi
141141
section_end
142142

143+
section_start "Setup printing"
144+
mysql_root "UPDATE configuration SET value = '\"cp [file] /tmp/dj-printfile\"' WHERE name = 'print_command';" domjudge
145+
section_end

submit/submit_online.bats

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,9 @@ setup() {
136136
assert_regex "Submission received: id = s[0-9]*, time = [0-9]{2}:[0-9]{2}:[0-9]{2}"
137137
assert_regex "Check http[^ ]*/[0-9]* for the result."
138138
}
139+
140+
@test "submit print job" {
141+
run ./submit -P -l C ../example_problems/hello/submissions/accepted/test-hello.c
142+
assert_success
143+
assert_regex "DOMjudge reported a successful print job."
144+
}

submit/submit_standalone.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ setup() {
4040
@test "display basic usage information" {
4141
run ./submit --help
4242
assert_success
43-
assert_line "usage: submit [--version] [-h] [-c CONTEST] [-p PROBLEM] [-l LANGUAGE] [-e ENTRY_POINT]"
43+
assert_line "usage: submit [--version] [-h] [-c CONTEST] [-P] [-p PROBLEM] [-l LANGUAGE] [-e ENTRY_POINT]"
4444
assert_line " [-v [{DEBUG,INFO,WARNING,ERROR,CRITICAL}]] [-q] [-y] [-u URL]"
4545
# The help printer does print this differently on versions of argparse for nargs=*.
4646
assert_regex " (filename )?[filename ...]"

0 commit comments

Comments
 (0)