mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +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
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.15.4",
|
||||
"version": "2.15.5",
|
||||
"main": "package.json",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -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