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
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.15.4",
|
"version": "2.15.5",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ function judgeCase(c: Case, sid: string) {
|
|||||||
},
|
},
|
||||||
time: 5000,
|
time: 5000,
|
||||||
memory: 256,
|
memory: 256,
|
||||||
|
env: ctx.env,
|
||||||
}).then((r) => {
|
}).then((r) => {
|
||||||
const out = r.stdout.toString();
|
const out = r.stdout.toString();
|
||||||
if (out.length) ctx.next({ compiler_text: out.substring(0, 1024) });
|
if (out.length) ctx.next({ compiler_text: out.substring(0, 1024) });
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { STATUS } from '@hydrooj/utils/lib/status';
|
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) {
|
export function parse(output: string, fullscore: number) {
|
||||||
let status = STATUS.STATUS_WRONG_ANSWER;
|
let status = STATUS.STATUS_WRONG_ANSWER;
|
||||||
|
|||||||
Reference in new issue
Block a user