Skip to content

Commit

Permalink
Fix a unit test
Browse files Browse the repository at this point in the history
For some reason the macro RESULT causes the test to crash Lua.

Don't see why. Don't know why this fixes it. But this gets the tests working.
  • Loading branch information
GregoryLundberg committed Oct 18, 2016
1 parent 9d9cc79 commit f4e2cc6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions data/test/scenarios/interrupts.cfg
Expand Up @@ -90,11 +90,17 @@
[/event]
[event]
name=success
{SUCCEED}
[endlevel]
result=victory
linger_mode = yes
[/endlevel]
[/event]
[event]
name=fail
{FAIL}
[endlevel]
result=defeat
linger_mode = yes
[/endlevel]
[/event]
)}

Expand Down

2 comments on commit f4e2cc6

@CelticMinstrel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I'd prefer not to do this. It kinda makes the test a bit less clear. :/

@GregoryLundberg
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could not find why adding and checking a variable suddenly caused RESULT to crash this one test. Something to do with pcall or exceptions.

Please sign in to comment.