mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 10:30:05 +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)
|
||||
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
|
||||
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
Execute ( SpaceVim lua layer: lang#java ):
|
||||
if has('nvim-0.5.0') || has('+lua')
|
||||
lua require('spacevim.layer.lang.java').set_variable({['format_on_save'] = false})
|
||||
lua format_on_save = require('spacevim.layer.lang.java').get_variable()
|
||||
let cmp = SpaceVim#api#import('vim#compatible')
|
||||
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
|
||||
endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user