mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: fix testlib multi-line matching
This commit is contained in:
1 parent
37a6a0365c
commit
a84b74be77
3 files changed
+3
-2
No files matched your search
@@ -105,6 +105,7 @@ function judgeCase(c: Case, sid: string) {
|
||||
},
|
||||
time: 5000,
|
||||
memory: 256,
|
||||
env: ctx.env,
|
||||
}).then((r) => {
|
||||
const out = r.stdout.toString();
|
||||
if (out.length) ctx.next({ compiler_text: out.substring(0, 1024) });
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { STATUS } from '@hydrooj/utils/lib/status';
|
||||
|
||||
const operation = /^(status|score)\((\d+)\) *(.*)$/;
|
||||
const operation = /^\s*(status|score)\((\d+)\)\s*(.*)$/m;
|
||||
|
||||
export function parse(output: string, fullscore: number) {
|
||||
let status = STATUS.STATUS_WRONG_ANSWER;
|
||||
|
||||
Reference in new issue
Block a user