feat(stmate-test): REA MCP(Ghidra) 파일 입출력 — JDL 탭 줄·묶음 내보내기·검사 · 구버전→Win8 변환 · 엑셀 역등록 구성 줄 · 자재 집계표 엑셀 · 그림 코드

- JDL 줄 = 탭 구분 + \x05/\x07 덧붙임(검사기 0x504d20 · 고정폭 표는 죽은 고리 — 34 §17.9 바로잡음) · 단가 목록 7종·Main·GongJong 머리·Global.Ini 상수 키 · zip 받기
- 구버전 판 가리기(Chk_Data 0x459280) · 7.x/DOS 표별 필드 대응 · B→X 조건 = 단위 X
- 엑셀 역등록 PRPT「속성」·PRIN「대상」·PROUT「저장」 = PR/RR 줄만 · 원본 BDQTY 4건 일치
- 자재 = 재료비 수량집계표 엑셀 내보내기(주요건설자재현황 시트)
- 그림 코드 = COSTN I 코드 IFORM · SIZE = 그림 클래스 이름
- 지식DB 37번

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-14 15:58:17 +09:00
co-authored by Claude Opus 5.5
parent 9734b6490d
commit 47a04b6df8
25 changed files with 6025 additions and 81 deletions
+13 -3
View File
@@ -54,7 +54,13 @@ def test_kind_by_extension():
def test_new_code_put_and_read_back(files):
data = _bmp()
out, rep = put_image(files, "i00009", data, "다리 사진.bmp")
assert rep == {"code": "I00009", "new": True, "kind": "TBITMAP", "bytes": len(data), "name": NEW_NAME}
assert rep == {
"code": "I00009",
"new": True,
"kind": "TBITMAP",
"bytes": len(data),
"name": NEW_NAME,
}
f2 = dict(files) | out
got, kind, mime = get_image(f2, "I00009")
assert got == data and kind == "TBITMAP" and mime == "image/bmp"
@@ -88,7 +94,9 @@ def test_sniff_when_size_blank(files):
t.set(find_rows(t, "CODE")["I00011"], "SIZE", "")
f2 = dict(files) | out | {"COSTN.DBF": t.to_bytes()}
assert get_image(f2, "I00011")[1] == "TBITMAP"
assert SixMemo(out["COSTN.SMT"]).read(t.raw(find_rows(t, "CODE")["I00011"], "IFORM"))[:2] == b"BM"
assert (
SixMemo(out["COSTN.SMT"]).read(t.raw(find_rows(t, "CODE")["I00011"], "IFORM"))[:2] == b"BM"
)
def test_api_put_writes_only_costn(files, tmp_path, monkeypatch):
@@ -101,4 +109,6 @@ def test_api_put_writes_only_costn(files, tmp_path, monkeypatch):
assert set(changed) <= {"COSTN.DBF", "COSTN.SMT"}
res = A.img_get(A.ImgReq(source_path=r["saved_stc"], code="I00012"))
assert res.headers["X-Img-Kind"] == "TBITMAP" and res.body[:2] == b"BM"
assert any(x["CODE"] == "I00012" for x in A.img_list(A.ImgReq(source_path=r["saved_dir"]))["rows"])
assert any(
x["CODE"] == "I00012" for x in A.img_list(A.ImgReq(source_path=r["saved_dir"]))["rows"]
)