1
0
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:
wsdjeg 2022-09-10 20:40:08 +08:00
parent 1b0a4515ed
commit 6f6d834d98
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -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