Skip to content

Commit

Permalink
tests: Add :while loop test
Browse files Browse the repository at this point in the history
  • Loading branch information
ZyX-I committed Apr 2, 2015
1 parent 8e55af1 commit e968a5a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/unit/viml/executor/blocks_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,26 @@ describe(':for loops', function()
end
end)

describe(':while loop', function()
local ito, itoe
do
local _obj_0 = require('test.unit.viml.executor.helpers')(it)
ito = _obj_0.ito
itoe = _obj_0.itoe
end
ito('works', [[
let i = 0
let j = 10
while i < j
let i += 1
let j -= 1
echo i
echo j
endwhile
unlet i j
]], {1, 9, 2, 8, 3, 7, 4, 6, 5, 5})
end)

describe('Function calls', function()
local ito, itoe
do
Expand Down

0 comments on commit e968a5a

Please sign in to comment.