Archived
1
0
Fork 0

Fix several bugs #1

The load function was too clever, simplified it by using Set
This uncovered an initialization bug in Set and a mishandling of Blank
This commit is contained in:
Julien Dessaux 2023-01-07 11:10:04 +01:00
parent 544a3f3763
commit 7d6ed4697e
Signed by: adyxax
GPG key ID: F92E51B86E07177E
4 changed files with 52 additions and 85 deletions

View file

@ -106,8 +106,6 @@ suite "Field":
check minimal.IsIn(1, 0) == false
test "Load":
check Load("nonexistant") == nil
check Load("examples/invalid.b98") == nil
check Load("examples/empty.b98") == nil
check Load("examples/minimal.b98")[] == Field(lx: 1, lines: @[Line(columns: @['@'].cols)])
let hello = Field(lx: 24, lines: @[Line(columns: @['6', '4', '+', '"', '!', 'd', 'l', 'r', 'o', 'W', ' ', ',', 'o', 'l', 'l', 'e', 'H', '"', '>', ':', '#', ',', '_', '@'].cols)])
check Load("examples/hello.b98")[] == hello