test(M02-흐름도): 식 보기 값 줄은 선 규칙을 지나 들어온 값으로 그림
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D2nUMUMTsqm93PbQtipo6c
This commit is contained in:
@@ -178,3 +178,18 @@ def test_조건_만들기_식과_다시_줄():
|
||||
def test_못_바꾸는_식은_null(formula):
|
||||
(back,) = run([{"op": "toDraft", "formula": formula}])
|
||||
assert back is None
|
||||
|
||||
|
||||
def test_받는_칸은_선_규칙을_지난_값으로_그림():
|
||||
# 시트에 남은 옛 값(99)이 아니라 규칙을 지나 들어온 값(arrived 0.15)으로 값 식을 그림
|
||||
box = func_box(
|
||||
{"B1": {"값": 99}, "B3": {"식": "B1*(1+B2/100)"}},
|
||||
[{"port": "석공량", "cell": "B1"}],
|
||||
[var("높이", "B2", 4)],
|
||||
"B3",
|
||||
"석공 인",
|
||||
)
|
||||
(got,) = run([{"op": "lines", "box": box, "arrived": {"석공량": 0.15}}])
|
||||
assert got["lines"][0]["valued"] == "0.15 × (1 + 4 ÷ 100) = 0.156"
|
||||
(stale,) = run([{"op": "lines", "box": box, "arrived": {}}])
|
||||
assert stale["lines"][0]["valued"].startswith("99 ×") # 들어온 값이 없을 때만 칸 값
|
||||
|
||||
Reference in New Issue
Block a user