failing test for multiline function

This commit is contained in:
Chris Wanstrath 2025-10-25 20:12:23 -07:00
parent 611c2a4c8a
commit 299ad2c9a9

View File

@ -85,6 +85,21 @@ describe('compiler', () => {
expect(`bloop = do: 'bloop' end; bloop`).toEvaluateTo('bloop') expect(`bloop = do: 'bloop' end; bloop`).toEvaluateTo('bloop')
}) })
test('function call with if statement and multiple expressions', () => {
expect(`
abc = do:
if false:
echo nope
end
true
end
abc
`)
.toEvaluateTo(true)
})
test('simple conditionals', () => { test('simple conditionals', () => {
expect(`(3 < 6)`).toEvaluateTo(true) expect(`(3 < 6)`).toEvaluateTo(true)
expect(`(10 > 20)`).toEvaluateTo(false) expect(`(10 > 20)`).toEvaluateTo(false)