@@ -7,62 +7,62 @@ local eq = assert.equal
77describe (" install" , function ()
88 before_each (function ()
99 helpers .clear ()
10- helpers .fn .delete (" ./busted /fixtures/basic/bin" , " rf" )
11- helpers .fn .delete (" ./busted /fixtures/basic/data" , " rf" )
12- helpers .fn .mkdir (" ./busted /fixtures/basic/data" , " p" )
13- helpers .fn .mkdir (" ./busted /fixtures/basic/bin" , " p" )
10+ helpers .fn .delete (" ./spec /fixtures/basic/bin" , " rf" )
11+ helpers .fn .delete (" ./spec /fixtures/basic/data" , " rf" )
12+ helpers .fn .mkdir (" ./spec /fixtures/basic/data" , " p" )
13+ helpers .fn .mkdir (" ./spec /fixtures/basic/bin" , " p" )
1414 -- Make plugin available
1515 exec_lua ([[ vim.opt.rtp:append'.']] )
1616 exec_lua ([[ vim.opt.rtp:append'./deps/plenary.nvim/']] )
1717 end )
1818
1919 it (" installs nextls when you open an elixir file and nextls isn't downloaded" , function ()
20- helpers .fn .writefile ({ " " }, " ./busted /fixtures/basic/data/.next-ls-force-update-v1" )
20+ helpers .fn .writefile ({ " " }, " ./spec /fixtures/basic/data/.next-ls-force-update-v1" )
2121 exec_lua ([[
22- vim.g.next_ls_cache_dir = "./busted /fixtures/basic/bin"
23- vim.g.next_ls_data_dir = "./busted /fixtures/basic/data"
24- vim.g.next_ls_default_bin = "./busted /fixtures/basic/bin/nextls"
25- require("elixir.nextls").setup({auto_update = true, cmd = "./busted /fixtures/basic/bin/nextls" })
26- vim.cmd.edit("./busted /fixtures/basic/lib/basic.ex")
22+ vim.g.next_ls_cache_dir = "./spec /fixtures/basic/bin"
23+ vim.g.next_ls_data_dir = "./spec /fixtures/basic/data"
24+ vim.g.next_ls_default_bin = "./spec /fixtures/basic/bin/nextls"
25+ require("elixir.nextls").setup({auto_update = true, cmd = "./spec /fixtures/basic/bin/nextls" })
26+ vim.cmd.edit("./spec /fixtures/basic/lib/basic.ex")
2727 ]] )
2828
29- eq (luv .fs_stat (" ./busted /fixtures/basic/bin/nextls" ).mode , 33523 )
29+ eq (luv .fs_stat (" ./spec /fixtures/basic/bin/nextls" ).mode , 33523 )
3030 end )
3131
3232 it (" forces an install if the flag is not set" , function ()
33- helpers .fn .mkdir (" ./busted /fixtures/basic/bin" , " p" )
34- helpers .fn .writefile ({ " foobar" }, " ./busted /fixtures/basic/bin/nextls" )
33+ helpers .fn .mkdir (" ./spec /fixtures/basic/bin" , " p" )
34+ helpers .fn .writefile ({ " foobar" }, " ./spec /fixtures/basic/bin/nextls" )
3535 exec_lua ([[
36- vim.g.next_ls_cache_dir = "./busted /fixtures/basic/bin"
37- vim.g.next_ls_data_dir = "./busted /fixtures/basic/data"
38- vim.g.next_ls_default_bin = "./busted /fixtures/basic/bin/nextls"
39- require("elixir.nextls").setup({auto_update = true, cmd = "./busted /fixtures/basic/bin/nextls" })
40- vim.cmd.edit("./busted /fixtures/basic/lib/basic.ex")
36+ vim.g.next_ls_cache_dir = "./spec /fixtures/basic/bin"
37+ vim.g.next_ls_data_dir = "./spec /fixtures/basic/data"
38+ vim.g.next_ls_default_bin = "./spec /fixtures/basic/bin/nextls"
39+ require("elixir.nextls").setup({auto_update = true, cmd = "./spec /fixtures/basic/bin/nextls" })
40+ vim.cmd.edit("./spec /fixtures/basic/lib/basic.ex")
4141 ]] )
4242
4343 assert .error (function ()
44- helpers .fn .readfile (" ./busted /fixtures/basic/bin/nextls" , " b" )
44+ helpers .fn .readfile (" ./spec /fixtures/basic/bin/nextls" , " b" )
4545 end )
46- eq (luv .fs_stat (" ./busted /fixtures/basic/bin/nextls" ).mode , 33523 )
46+ eq (luv .fs_stat (" ./spec /fixtures/basic/bin/nextls" ).mode , 33523 )
4747 end )
4848
4949 it (" doesnt force an install if the flag is set" , function ()
50- helpers .fn .writefile ({ " " }, " ./busted /fixtures/basic/data/.next-ls-force-update-v1" )
51- helpers .fn .mkdir (" ./busted /fixtures/basic/bin" , " p" )
52- helpers .fn .writefile ({ " foobar" }, " ./busted /fixtures/basic/bin/nextls" )
50+ helpers .fn .writefile ({ " " }, " ./spec /fixtures/basic/data/.next-ls-force-update-v1" )
51+ helpers .fn .mkdir (" ./spec /fixtures/basic/bin" , " p" )
52+ helpers .fn .writefile ({ " foobar" }, " ./spec /fixtures/basic/bin/nextls" )
5353 local screen = Screen .new ()
5454 screen :attach ()
5555 exec_lua ([[
56- vim.g.next_ls_cache_dir = "./busted /fixtures/basic/bin"
57- vim.g.next_ls_data_dir = "./busted /fixtures/basic/data"
58- vim.g.next_ls_default_bin = "./busted /fixtures/basic/bin/nextls"
59- require("elixir.nextls").setup({auto_update = true, cmd = "./busted /fixtures/basic/bin/nextls" })
60- vim.cmd.edit("./busted /fixtures/basic/lib/basic.ex")
56+ vim.g.next_ls_cache_dir = "./spec /fixtures/basic/bin"
57+ vim.g.next_ls_data_dir = "./spec /fixtures/basic/data"
58+ vim.g.next_ls_default_bin = "./spec /fixtures/basic/bin/nextls"
59+ require("elixir.nextls").setup({auto_update = true, cmd = "./spec /fixtures/basic/bin/nextls" })
60+ vim.cmd.edit("./spec /fixtures/basic/lib/basic.ex")
6161 ]] )
6262
6363 helpers .feed (" <cr>" )
6464 -- screen:snapshot_util()
65- eq (helpers .fn .readfile (" ./busted /fixtures/basic/bin/nextls" , " b" )[1 ], " foobar" )
65+ eq (helpers .fn .readfile (" ./spec /fixtures/basic/bin/nextls" , " b" )[1 ], " foobar" )
6666 screen :expect {
6767 grid = [[
6868 ^defmodule Basic do |
@@ -81,7 +81,7 @@ describe("install", function()
8181 |
8282 ]] ,
8383 attr_ids = {
84- [1 ] = { bold = true , foreground = Screen .colors .Blue1 },
84+ [1 ] = { foreground = Screen .colors .NvimLightGrey4 },
8585 },
8686 }
8787 end )
0 commit comments