failing test for multiline function
This commit is contained in:
parent
e4100c7d89
commit
f459fe36ca
|
|
@ -85,6 +85,21 @@ describe('compiler', () => {
|
|||
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', () => {
|
||||
expect(`(3 < 6)`).toEvaluateTo(true)
|
||||
expect(`(10 > 20)`).toEvaluateTo(false)
|
||||
|
|
@ -139,10 +154,6 @@ describe('compiler', () => {
|
|||
scattered
|
||||
end`).toEvaluateTo('dwarf')
|
||||
})
|
||||
|
||||
test('single line if', () => {
|
||||
expect(`if 3 < 9: shire`).toEvaluateTo('shire')
|
||||
})
|
||||
})
|
||||
|
||||
describe('errors', () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user