@@ -57,57 +57,5 @@ describe("LuaRocks command line #integration", function()
57
57
local output = run .luarocks (" --lua-version=bozo" )
58
58
assert .match (" malformed" , output , 1 , true )
59
59
end )
60
-
61
- it (" warns but continues if given an invalid version" , function ()
62
- local output = run .luarocks (" --lua-version=1.0" )
63
- assert .match (" Warning: Lua 1.0 interpreter not found" , output , 1 , true )
64
- assert .match (" Version%s*:%s*1.0" , output )
65
- end )
66
-
67
- it (" sets the version independently of project tree" , function ()
68
- test_env .run_in_tmp (function (tmpdir )
69
- assert .truthy (run .luarocks_bool (" init --lua-version=" .. test_env .lua_version .. " --lua-versions=" .. test_env .lua_version ))
70
-
71
- local output = run .luarocks (" --lua-version=1.0" )
72
- assert .match (" Version%s*:%s*1.0" , output )
73
-
74
- output = run .luarocks (" --lua-version=1.0 --project-tree=." )
75
- assert .match (" Version%s*:%s*1.0" , output )
76
- end , finally )
77
- end )
78
60
end )
79
-
80
- it (" detects version based on project tree" , function ()
81
- test_env .run_in_tmp (function (tmpdir )
82
- assert .truthy (run .luarocks_bool (" init --lua-version=" .. test_env .lua_version ))
83
- assert .truthy (run .luarocks_bool (" config lua_version 1.0 --project-tree=" .. tmpdir .. " /lua_modules" ))
84
-
85
- lfs .mkdir (" aaa" )
86
- lfs .chdir (" aaa" )
87
- lfs .mkdir (" bbb" )
88
- lfs .chdir (" bbb" )
89
-
90
- local output = run .luarocks (" " )
91
- assert .match (" Version%s*:%s*1.0" , output )
92
- end , finally )
93
- end )
94
-
95
- -- for backward compatibility
96
- it (" detects version of a project based on config" , function ()
97
- test_env .run_in_tmp (function (tmpdir )
98
- assert .truthy (run .luarocks_bool (" init --lua-version=" .. test_env .lua_version ))
99
- os.remove (" .luarocks/config-" .. test_env .lua_version .. " .lua" )
100
- os.remove (" .luarocks/default-lua-version.lua" )
101
- test_env .write_file (" .luarocks/config-5.2.lua" , [[ ]] , finally )
102
-
103
- lfs .mkdir (" aaa" )
104
- lfs .chdir (" aaa" )
105
- lfs .mkdir (" bbb" )
106
- lfs .chdir (" bbb" )
107
-
108
- local output = run .luarocks (" " )
109
- assert .match (" Version%s*:%s*5.2" , output )
110
- end , finally )
111
- end )
112
-
113
61
end )
0 commit comments