- Sangeun_Detail — 텍스트 수식 = 답 `글` · 시험 계산 = 답 `줄` · `기준` · `중간`(`buildCalc` 덧칸 `answer` · `shown` · `held`) · `/logic-lib/calc` · `/text` · 미리보기 부름 · `baseCovers` · `dropText` · `applyCovers` 걷음 · 바탕 원값 셈 = `보기: false` - 재료 고름(줄 모달 · 시험 계산 재료 칸) = SK 문서 `고름`(cid 열쇠 · 둘째 기초 세부 줄은 보기만) - LogicLab_Ho — 읽는 식 줄을 `cid` 로 이음(`HoContext.cids` · 이름 차례 추측은 M01 만) · LogicLab_Formula — 단위 환산 `나눔` 머리 한 줄 - 낡은 시험 고침 — test_717_2b(`baseCovers` · `dropText` 단정 뺌 · 함수 지움) · test_725_1(`void recalc()` 새 꼴) · 새 지킴 test_750_2 - M01 단가산출 기초 = 덧칸 안 넘겨 옛 길 그대로 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
33 lines
1.5 KiB
Python
33 lines
1.5 KiB
Python
"""750-2 화면 — 네 보기가 SK 셈 답 하나로(바탕 M01 로직 따로 셈 길 걷음) · 재료 고름 = 문서 `고름` ·
|
|
읽는 식 줄 = cid 로 이음 · 옵션 바꿈 = SK 셈 한 번(원문 대조는 서버 test_750_1)."""
|
|
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
|
|
|
|
def _ts(rel: str) -> str:
|
|
return (ROOT / rel).read_text("utf-8")
|
|
|
|
|
|
def test_detail_uses_only_sk_answer():
|
|
ts = _ts("M02_MasterTemplete/M02_MasterTemplete_Sangeun_Detail.ts")
|
|
assert "text = got.글" in ts and "answer: async" in ts and "shown: shownOf" in ts
|
|
assert "onText" not in ts and "onLines" not in ts # 바탕 `/calc` · `/text` 부름 걷음
|
|
assert "dropText" not in ts and "baseCovers" not in ts and "applyCovers" not in ts
|
|
assert "calcSangeun(scope, plain, values, false)" in ts # 바탕 원값 셈 = 보기 덧칸 없이
|
|
assert "doc.고름 = " in ts and "pickMat" in ts # 재료 고름 = SK 문서 고름
|
|
|
|
|
|
def test_text_lines_joined_by_cid():
|
|
ho = _ts("M01_MasterData/M01_MasterData_UI_LogicLab_Ho.ts")
|
|
assert "ctx.cids && line.cid" in ho and "pickMat" in ho
|
|
api = _ts("M01_MasterData/M01_MasterData_UI_Logic_Api.ts")
|
|
assert "cid?: string" in api and "나눔?: number" in api
|
|
|
|
|
|
def test_calc_view_answer_hook_skips_logic_lib():
|
|
ts = _ts("M01_MasterData/M01_MasterData_UI_Logic_Calc.ts")
|
|
assert "ctx.onText && !ctx.answer" in ts # 미리보기 안 부름
|
|
assert "if (ctx.answer)" in ts and "runCalc" in ts # M01 옛 길 그대로
|