mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 22:20:06 +08:00
test(java): fix java layer test
This commit is contained in:
parent
1b0a4515ed
commit
6f6d834d98
@ -22,8 +22,9 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function M.set_variable(var)
|
function M.set_variable(var)
|
||||||
format_on_save = var.format_on_save or format_on_save
|
if var.format_on_save ~= nil then
|
||||||
|
format_on_save = var.format_on_save
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
Execute ( SpaceVim lua layer: lang#java ):
|
Execute ( SpaceVim lua layer: lang#java ):
|
||||||
if has('nvim-0.5.0') || has('+lua')
|
if has('nvim-0.5.0') || has('+lua')
|
||||||
lua require('spacevim.layer.lang.java').set_variable({['format_on_save'] = false})
|
let cmp = SpaceVim#api#import('vim#compatible')
|
||||||
lua format_on_save = require('spacevim.layer.lang.java').get_variable()
|
lua require('spacevim.layer.lang.java').set_variable({format_on_save = false})
|
||||||
|
lua format_on_save = require('spacevim.layer.lang.java').get_variable().format_on_save
|
||||||
AssertEqual cmp.luaeval('format_on_save'), v:false
|
AssertEqual cmp.luaeval('format_on_save'), v:false
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user