fix(est-test): reject duplicate JDL tables

This commit is contained in:
2026-11-10 06:40:12 +09:00
parent 5520e3c575
commit 32043f3c01
4 changed files with 27 additions and 1 deletions
+6 -1
View File
@@ -297,7 +297,12 @@ function output(project) {
return { bytes: pack(files), warnings };
}
function read(bytes, project) {
const files = new Map([...unpack(bytes)].map(([k, v]) => [k.toLowerCase(), v]));
const files = new Map();
for (const [name, data] of unpack(bytes)) {
const key = name.toLowerCase();
if (files.has(key)) throw Error(`JDL 파일명 중복: ${name}`);
files.set(key, data);
}
if (!files.has("global.ini") || !files.has("main.txt"))
throw Error("Global.ini/Main.txt 없는 JDL입니다.");
const main = decoder