Skip to content

Commit

Permalink
Use os.remove instead of 'call delete()'
Browse files Browse the repository at this point in the history
  • Loading branch information
rainerborene committed Oct 24, 2014
1 parent f372890 commit 5d006f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/functional/helpers.lua
Expand Up @@ -196,7 +196,7 @@ rawfeed([[:function BeforeEachTest()
let regs = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/-"'
let i = 0
while i < strlen(regs)
exec 'let @' . regs[i] . '=""'
call setreg(regs[i], '')
let i = i+1
endwhile
unlet regs
Expand Down
7 changes: 4 additions & 3 deletions test/functional/legacy/004_bufenter_with_modelines_spec.lua
Expand Up @@ -45,9 +45,7 @@ describe('BufEnter with modelines', function()
-- Include Xxx in the current file
feed('G:r Xxx<CR>')

-- Remove Xxx
execute('call delete("Xxx")')

-- The buffer should now contain
expect([[
startstart
start of test file Xxx
Expand All @@ -66,5 +64,8 @@ describe('BufEnter with modelines', function()
this is a test
this should be in column 1
end of test file Xxx]])

-- Remove Xxx
os.remove('Xxx')
end)
end)
6 changes: 4 additions & 2 deletions test/functional/legacy/102_fnameescape_spec.lua
Expand Up @@ -10,15 +10,17 @@ describe('fnameescape', function()
it('is working', function()
execute('let fname = "Xspa ce"')
execute('try', 'exe "w! " . fnameescape(fname)', "put='Space'", 'endtry')
execute('call delete(fname)')

execute('let fname = "Xemark!"')
execute('try', 'exe "w! " . fnameescape(fname)', "put='ExclamationMark'", 'endtry')
execute('call delete(fname)')

expect([[
Space
ExclamationMark]])

-- Remove fixtures
os.remove("Xspa ce")
os.remove("Xemark!")
end)
end)

0 comments on commit 5d006f2

Please sign in to comment.