UMDLARS / one_night_in_sf

A story game demonstrating why physical security is important and complex!
2 stars 2 forks source link

Fix tests. #175

Closed spacehobo closed 8 months ago

spacehobo commented 8 months ago

The tests have been failing for a long time now:

/usr/bin/time  /usr/bin/python3 plotex/regtest.py -v -t 5 -i node_modules/.bin/zvm untitledHeistGame.test > untitledHeistGame.out || ! grep -Hn '^\*\*\*' untitledHeistGame.out
Command exited with non-zero status 1
6.21user 0.53system 0:05.81elapsed 116%CPU (0avgtext+0avgdata 67228maxresident)k
0inputs+152outputs (0major+117198minor)pagefaults 0swaps
untitledHeistGame.out:183:*** <LiteralCheck "You can't, since the Office Door...">: not found
untitledHeistGame.out:193:*** <LiteralCheck "You unlock the office door and o...">: not found
untitledHeistGame.out:212:*** <LiteralCheck "You close the Office Door.">: not found
untitledHeistGame.out:279:*** <LiteralCheck "You can't, since the Office Door...">: not found
untitledHeistGame.out:289:*** <LiteralCheck "You unlock the office door and o...">: not found
untitledHeistGame.out:1841:*** <LiteralCheck "You can't, since the Office Door...">: not found
untitledHeistGame.out:1846:*** <LiteralCheck "You remove the hinges of the doo...">: not found
untitledHeistGame.out:1851:*** <LiteralCheck "You can't, since the Office Door...">: not found
untitledHeistGame.out:1856:*** <LiteralCheck "You move the door out of the way...">: not found
untitledHeistGame.out:1865:*** <LiteralCheck "You boot the computer and are gr...">: not found
untitledHeistGame.out:1870:*** <LiteralCheck "You insert the USB drive into th...">: not found
untitledHeistGame.out:1875:*** <LiteralCheck "The computer boots to a linux de...">: not found
make: *** [Makefile:53: untitledHeistGame.out] Error 1

It's making it difficult to work on unrelated changes, because when I run :make in vim, I get taken to line 183 of untitledHeistGame.out where that first error is.

The test suite is essential for being able to make changes without having to keep bugs in our head. Without the clarity of all tests passing, there's no way to know if any change we make won't break something else.

I'm going to open another issue to improve our test coverage: ideally we should be adding tests in a new branch when we open an issue, and only resolving the issue when that branch is merged with both the code and the now-passing test. I appreciate that's a large demand for an on-again-off-again project in a weird 90s hobby language, so I'm not going to add it to the MVP milestone.

spacehobo commented 8 months ago

Okay, this is what remains in untitledHeistGame.out:

1836-> remove pins with screwdriver
1837- remove pins with screwdriver
1838-You remove the pins from the hinges of the door! The door falls forward with a loud *THUD* echoing through the halls...
1839-> n
1840- n
1841-Len's Office
1842-This is an office. To the south there is a door leading back to the hallway.
1843-
1844-You can see a Large Wooden Door and Len's Computer here.
1845-
1846:*** <LiteralCheck "You can't, since the Large Woode...">: not found
1847-> move door
1848- move door
1849-That's fixed in place.
1850-
1851:*** <LiteralCheck "You move the door out of the way...">: not found

This seems related to #146, so perhaps that's already been fixed?