"""엑셀물량 파일목록: 추가(같은 이름 거부·번호)·삭제.""" 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, }