- M01 단가산출 기초 · M02 단가산출 상세 보기 = 수식(줄 쌓기 · 기본) · 단가산출 상세 둘 - 줄 쌓기에 M02 사본 [단가 갱신] · [재생성](미리 셈 → 알림 → 저장 · 고침 있으면 막음) · 판 바뀜(409) 문서 그대로면 새 판으로 다시 저장 옮김 - 옛 수식 문서 화면 걷음(formula_doc_screen · defs · edit · lines · math · math_model · rows · sub · formula_doc.css) · 이미 안 부르던 796-2 수식 나무 화면(LogicLab_Equation · Defs · Var · css · M01_Logic_Equation_Model · sheet_formula_cell · ui_template_equation_defs · edit) 걷음 — 18 파일 4,860 줄 - formula_doc_render = 줄 쌓기가 쓰는 reach 만 · 옵션 가로 CSS 는 line_stack.css 로 - 남김 = 계산기 common_util_formula_doc* · 서버 길 · 옵션 · 사본 표지 · 합계 상자 · KaTeX · 시험 페이지 tools/line-stack-test - 시험: test_796_2 지움(걷은 화면 원본 검사뿐) · 799_1 · 800_2 걷은 화면 줄만 뺌 · 799_2 · 802_4b2 · 804_2 보기 · 화면 파일 대상 바꿈 · test_804_6 새로(걷은 파일 · 부르는 곳 없음 · 첫 탭 · 사본 할일) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
71 lines
2.8 KiB
Python
71 lines
2.8 KiB
Python
"""804-6(요구 686-1) — 옛 수식 문서 탭 걷음 · 줄 쌓기 = 첫 「수식」 탭 지킴.
|
|
|
|
① 걷은 파일 없고 부르는 곳 없음 ② M01 · M02 보기 = 수식(줄 쌓기) · 단가산출 상세
|
|
③ 줄 쌓기가 사본 [단가 갱신] · [재생성] · 판 바뀜 다시 저장을 이어 받음.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
GONE = [
|
|
"A00_Common/formula_doc_screen.ts",
|
|
"A00_Common/formula_doc_defs.ts",
|
|
"A00_Common/formula_doc_edit.ts",
|
|
"A00_Common/formula_doc_lines.ts",
|
|
"A00_Common/formula_doc_math.ts",
|
|
"A00_Common/formula_doc_math_model.ts",
|
|
"A00_Common/formula_doc_rows.ts",
|
|
"A00_Common/formula_doc_sub.ts",
|
|
"A00_Common/formula_doc.css",
|
|
"A00_Common/sheet_formula_cell.ts",
|
|
"M01_MasterData/M01_MasterData_UI_LogicLab_Equation.ts",
|
|
"M01_MasterData/M01_MasterData_UI_LogicLab_Equation.css",
|
|
"M01_MasterData/M01_MasterData_UI_LogicLab_EquationDefs.ts",
|
|
"M01_MasterData/M01_MasterData_UI_LogicLab_EquationVar.ts",
|
|
"M01_MasterData/logic/M01_Logic_Equation_Model.ts",
|
|
"ui_template/ui_template_equation_defs.ts",
|
|
"ui_template/ui_template_equation_edit.ts",
|
|
]
|
|
|
|
|
|
def _text(rel: str) -> str:
|
|
return (ROOT / rel).read_text(encoding="utf-8")
|
|
|
|
|
|
def test_걷은_파일_없고_부르는_곳_없음():
|
|
assert not [g for g in GONE if (ROOT / g).exists()]
|
|
names = [Path(g).name.rsplit(".", 1)[0] for g in GONE]
|
|
out = subprocess.run(
|
|
["git", "-c", "core.quotepath=off", "ls-files", "*.ts", "*.css", "*.html"],
|
|
cwd=ROOT, capture_output=True, text=True, encoding="utf-8", check=True,
|
|
).stdout # fmt: skip
|
|
for rel in out.splitlines():
|
|
if rel.startswith(("docs/", "tmp/")) or not (ROOT / rel).exists():
|
|
continue
|
|
text = (ROOT / rel).read_text(encoding="utf-8", errors="ignore")
|
|
for n in names:
|
|
assert f'/{n}"' not in text and f"{n}.css" not in text, (rel, n)
|
|
|
|
|
|
def test_보기_수식은_줄쌓기_첫탭():
|
|
for rel in (
|
|
"M01_MasterData/M01_MasterData_UI_LogicLab_View.ts",
|
|
"M02_MasterTemplete/M02_MasterTemplete_Sangeun_Tabs.ts",
|
|
):
|
|
src = _text(rel)
|
|
assert '{ value: "stack", label: tl("View_Equation") },' in src, rel
|
|
assert 'value: "stack",\n' in src and '"equation"' not in src, rel
|
|
lab = _text("M01_MasterData/M01_MasterData_UI_LogicLab.ts")
|
|
assert "createStackScreen({" in lab and "createDocScreen" not in lab
|
|
|
|
|
|
def test_줄쌓기가_사본_할일_이어받음():
|
|
src = _text("A00_Common/line_stack_screen.ts")
|
|
assert "copyTools(true, (job) => void runJob(job))" in src
|
|
assert 'call<JobReply>("/preview", { 할일: job })' in src
|
|
assert "e.status !== 409" in src and "#끊음" not in src
|
|
assert len(src.splitlines()) <= 700
|