- 웹 계산·표시 옵션에 이어진 칸은 그 옵션에, 나머지는 값만, PC 설정은 브라우저에 - 바꾼 칸만 씀, 원본 적용 알림 - 코드표시 켜면 표에 코드 열, 레벨 표시 끄면 레벨 열 뺌 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
1.1 KiB
Python
27 lines
1.1 KiB
Python
"""환경설정 전체: 읽기 기본값·바뀐 칸만 쓰기·옵션 자리(계산·표시·기성·Env)."""
|
|
|
|
from test_est_rea_parity import run
|
|
|
|
|
|
def test_write_only_changed_fields_to_their_places():
|
|
result = run(
|
|
"math",
|
|
"""(()=>{
|
|
const A=EstOptionAll, item=(k)=>A.TABS.flatMap(t=>t[1]).find(i=>i.k===k);
|
|
const o={HeadDigits:2,VerFormat:true,CostValueTrunc:false,AutoCalc:true};
|
|
const r0={head:A.read(o,item('headDigits')),fmt:A.read(o,item('format')),code:A.read(o,item('code')),
|
|
total:A.read(o,item('totalName'))};
|
|
A.write(o,{headDigits:1,format:1,code:true,level:true,jabbi:true,costMethod:1,recalc:2,twoLine:1});
|
|
return {r0,o};
|
|
})()""",
|
|
)
|
|
assert result["r0"] == {"head": 1, "fmt": 0, "code": False, "total": "순공사비"}
|
|
o = result["o"]
|
|
assert o["HeadDigits"] == 2 # 1 → 1 그대로(바뀌지 않음)
|
|
assert o["VerFormat"] is False
|
|
assert o["CostValueTrunc"] is True
|
|
assert o["OldRecalcMethod"] == 2
|
|
assert o["Display"] == {"code": True, "twoLine": True}
|
|
assert o["AccomOption"] == {"level": True}
|
|
assert o["Env"] == {"jabbi": True}
|