File tree Expand file tree Collapse file tree 8 files changed +15
-7
lines changed Expand file tree Collapse file tree 8 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ elseif ravi then
41
41
banner = ' ^Ravi %d%.%d%.%d'
42
42
end
43
43
44
- local lua = get_lua_binary_name ()
44
+ local lua = _retrieve_progname ()
45
45
local luac = jit and lua or (lua .. ' c' )
46
46
47
47
if not pcall (io.popen , lua .. [[ -e "a=1"]] ) then
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ if ravi then
38
38
skip_all (" ravi" )
39
39
end
40
40
41
- local lua = get_lua_binary_name ()
41
+ local lua = _retrieve_progname ()
42
42
local luac = lua .. ' c'
43
43
44
44
if not pcall (io.popen , lua .. [[ -e "a=1"]] ) then
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ local has_warn = _VERSION >= 'Lua 5.4'
48
48
local has_xpcall52 = _VERSION >= ' Lua 5.2' or jit
49
49
local has_xpcall53 = _VERSION >= ' Lua 5.3' or jit
50
50
51
- local lua = get_lua_binary_name ()
51
+ local lua = _retrieve_progname ()
52
52
53
53
plan ' no_plan'
54
54
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ local has_read53 = _VERSION >= 'Lua 5.3' or luajit21
40
40
local has_meta53 = _VERSION >= ' Lua 5.3'
41
41
local has_meta54 = _VERSION >= ' Lua 5.4'
42
42
43
- local lua = get_lua_binary_name ()
43
+ local lua = _retrieve_progname ()
44
44
45
45
plan ' no_plan'
46
46
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ require'tap'
34
34
local profile = require ' profile'
35
35
local luajit20 = jit and (jit .version_num < 20100 and not jit .version :match ' ^RaptorJIT' )
36
36
local has_execute51 = _VERSION == ' Lua 5.1' and (not profile .luajit_compat52 or ujit )
37
- local lua = get_lua_binary_name ()
37
+ local lua = _retrieve_progname ()
38
38
39
39
plan ' no_plan'
40
40
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ Tests Lua Basic & IO Libraries with stdin
26
26
27
27
require ' tap'
28
28
29
- local lua = get_lua_binary_name ()
29
+ local lua = _retrieve_progname ()
30
30
31
31
if not pcall (io.popen , lua .. [[ -e "a=1"]] ) then
32
32
skip_all " io.popen not supported"
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ if not jit or ujit then
31
31
skip_all (" only with LuaJIT" )
32
32
end
33
33
34
- local lua = get_lua_binary_name ()
34
+ local lua = _retrieve_progname ()
35
35
36
36
if not pcall (io.popen , lua .. [[ -e "a=1"]] ) then
37
37
skip_all (" io.popen not supported" )
Original file line number Diff line number Diff line change 9
9
10
10
]]
11
11
12
+ function _retrieve_progname ()
13
+ local i = 0
14
+ while arg [i ] do
15
+ i = i - 1
16
+ end
17
+ return arg [i + 1 ]
18
+ end
19
+
12
20
if pcall (require , ' Test.More' ) then
13
21
diag ' Test.More loaded'
14
22
return
You can’t perform that action at this time.
0 commit comments