@@ -2,49 +2,50 @@ local Path = require("plenary.path")
22local eq = assert .are .same
33local Download = require (" elixir.elixirls.download" )
44vim .notify = function (thing )
5- io.stdout :write (thing .. " \n " )
5+ io.stdout :write (thing .. " \n " )
66end
77
88describe (" download" , function ()
9- before_each (function ()
10- vim .fn .system ([[ rm -rf tmp/downloads]] )
9+ before_each (function ()
10+ vim .fn .system ([[ rm -rf tmp/downloads]] )
1111
12- assert (not Path :new (" tmp/downloads" ):exists (), " tmp/downloads was not deleted" )
13- end )
12+ assert (not Path :new (" tmp/downloads" ):exists (), " tmp/downloads was not deleted" )
13+ end )
1414
15- it (" can git clone HEAD of the source code" , function ()
16- local download_dir = " tmp/downloads"
15+ it (" can git clone HEAD of the source code" , function ()
16+ local download_dir = " tmp/downloads"
1717
18- local result = Download .clone (download_dir , { repo = " elixir-lsp/elixir-ls" , ref = " HEAD" })
18+ local result = Download .clone (download_dir , { repo = " elixir-lsp/elixir-ls" , ref = " HEAD" })
1919
20- eq (" elixir-lsp/elixir-ls/HEAD" , result )
21- assert .True (Path :new (download_dir , " elixir-lsp/elixir-ls/HEAD" , " mix.exs" ):exists ())
22- end )
20+ eq (" elixir-lsp/elixir-ls/HEAD" , result )
21+ assert .True (Path :new (download_dir , " elixir-lsp/elixir-ls/HEAD" , " mix.exs" ):exists ())
22+ end )
2323
24- it (" can clone from a different repository" , function ()
25- local download_dir = " tmp/downloads"
24+ it (" can clone from a different repository" , function ()
25+ local download_dir = " tmp/downloads"
2626
27- local result = Download .clone (download_dir , { repo = " mhanberg/elixir-ls" , ref = " HEAD" })
27+ local result = Download .clone (download_dir , { repo = " mhanberg/elixir-ls" , ref = " HEAD" })
2828
29- eq (" mhanberg/elixir-ls/HEAD" , result )
30- assert .True (Path :new (download_dir , " mhanberg/elixir-ls/HEAD" , " mix.exs" ):exists ())
31- end )
29+ eq (" mhanberg/elixir-ls/HEAD" , result )
30+ assert .True (Path :new (download_dir , " mhanberg/elixir-ls/HEAD" , " mix.exs" ):exists ())
31+ end )
3232
33- it (" can checkout a different branch" , function ()
34- local download_dir = " tmp/downloads"
33+ it (" can checkout a different branch" , function ()
34+ local download_dir = " tmp/downloads"
3535
36- local result = Download .clone (download_dir , { repo = " mhanberg/elixir-ls" , ref = " mh/all-workspace-symbols" })
36+ local result =
37+ Download .clone (download_dir , { repo = " mhanberg/elixir-ls" , ref = " mh/all-workspace-symbols" })
3738
38- eq (" mhanberg/elixir-ls/mh_all-workspace-symbols" , result )
39- assert .True (Path :new (download_dir , " mhanberg/elixir-ls/mh_all-workspace-symbols" , " mix.exs" ):exists ())
40- end )
39+ eq (" mhanberg/elixir-ls/mh_all-workspace-symbols" , result )
40+ assert .True (Path :new (download_dir , " mhanberg/elixir-ls/mh_all-workspace-symbols" , " mix.exs" ):exists ())
41+ end )
4142
42- it (" can checkout a different tag" , function ()
43- local download_dir = " tmp/downloads"
43+ it (" can checkout a different tag" , function ()
44+ local download_dir = " tmp/downloads"
4445
45- local result = Download .clone (download_dir , { repo = " elixir-lsp/elixir-ls" , ref = " tags/v0.14.6" })
46+ local result = Download .clone (download_dir , { repo = " elixir-lsp/elixir-ls" , ref = " tags/v0.14.6" })
4647
47- eq (" elixir-lsp/elixir-ls/tags_v0.14.6" , result )
48- assert .True (Path :new (download_dir , " elixir-lsp/elixir-ls/tags_v0.14.6" , " mix.exs" ):exists ())
49- end )
48+ eq (" elixir-lsp/elixir-ls/tags_v0.14.6" , result )
49+ assert .True (Path :new (download_dir , " elixir-lsp/elixir-ls/tags_v0.14.6" , " mix.exs" ):exists ())
50+ end )
5051end )
0 commit comments