judge: better read_cases (#111)

This commit is contained in:
undefined committed 2021-05-01 12:35:17 +08:00
1 parent 9cdd47d256
commit cc0fc9e5b3
4 files changed
+14 -9

No files matched your search

+1 -1
View File
@@ -51,7 +51,7 @@ export default async function readYamlCases(cfg: Record<string, any> = {}, check
} else if (cfg.subtasks) {
for (const subtask of cfg.subtasks) {
const cases = [];
for (const c of subtask.cases) {
for (const c of subtask.cases || []) {
config.count++;
cases.push({
input: c.input ? checkFile(c.input, 'Cannot find input file {0}.') : '/dev/null',