- 공사에 엑셀 물량 파일 담기(같은 이름 거부), 삭제, 내려받기 - 셀 수량 연결 창에서 목록 파일 고르기, 새 파일 연결 때 목록 등록 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
900 B
Python
27 lines
900 B
Python
"""엑셀물량 파일목록: 추가(같은 이름 거부·번호)·삭제."""
|
|
|
|
from test_est_rea_parity import run
|
|
|
|
|
|
def test_add_remove_and_duplicate_name():
|
|
result = run(
|
|
"math",
|
|
"""(()=>{
|
|
const p=EstNative.empty(),F=EstExcelFiles;
|
|
F.add(p,'a.xlsx','QUJD');F.add(p,'b.xls','REVG');
|
|
let dup=null;try{F.add(p,'a.xlsx','')}catch(e){dup=e.message}
|
|
const idx=p.excelFiles.map(f=>f.Index);
|
|
F.remove(p,'a.xlsx');const after=p.excelFiles.map(f=>f.FileName);
|
|
F.add(p,'c.xlsx','');const next=p.excelFiles.at(-1).Index;
|
|
F.remove(p,'b.xls');F.remove(p,'c.xlsx');
|
|
return {dup,idx,after,next,gone:'excelFiles' in p};
|
|
})()""",
|
|
)
|
|
assert result == {
|
|
"dup": "같은 이름의 파일이 내역서에 포함되어 있습니다.",
|
|
"idx": [1, 2],
|
|
"after": ["b.xls"],
|
|
"next": 3,
|
|
"gone": False,
|
|
}
|