diff options
Diffstat (limited to 'tests/test.lua')
-rwxr-xr-x | tests/test.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test.lua b/tests/test.lua index 8fafdf3..2f6c7f6 100755 --- a/tests/test.lua +++ b/tests/test.lua | |||
@@ -40,7 +40,7 @@ local mode = "global" | |||
40 | if arg[1] == "module" then | 40 | if arg[1] == "module" then |
41 | mode = "module" | 41 | mode = "module" |
42 | end | 42 | end |
43 | 43 | local self = arg[0] | |
44 | 44 | ||
45 | package.path = "../?.lua;../?/init.lua" | 45 | package.path = "../?.lua;../?/init.lua" |
46 | package.cpath = "./?-"..V..".so;./?-"..V..".dll;./?.so;./?.dll" | 46 | package.cpath = "./?-"..V..".so;./?-"..V..".dll;./?.so;./?.dll" |
@@ -603,11 +603,11 @@ end | |||
603 | ___'' | 603 | ___'' |
604 | do | 604 | do |
605 | writefile("data.txt", "123 18.8 hello world\ni'm here\n") | 605 | writefile("data.txt", "123 18.8 hello world\ni'm here\n") |
606 | for a,b in io.lines("test.lua", 2, "*l") do | 606 | for a,b in io.lines(self, 2, "*l") do |
607 | print("io.lines()", a, b) | 607 | print("io.lines()", a, b) |
608 | break | 608 | break |
609 | end | 609 | end |
610 | for l in io.lines("test.lua") do | 610 | for l in io.lines(self) do |
611 | print("io.lines()", l) | 611 | print("io.lines()", l) |
612 | break | 612 | break |
613 | end | 613 | end |
@@ -624,7 +624,7 @@ do | |||
624 | for l in io.lines("no_such_file.txt") do print(l) end | 624 | for l in io.lines("no_such_file.txt") do print(l) end |
625 | end)) | 625 | end)) |
626 | if mode ~= "module" then | 626 | if mode ~= "module" then |
627 | local f = assert(io.open("test.lua", "r")) | 627 | local f = assert(io.open(self, "r")) |
628 | for a,b in f:lines(2, "*l") do | 628 | for a,b in f:lines(2, "*l") do |
629 | print("file:lines()", a, b) | 629 | print("file:lines()", a, b) |
630 | break | 630 | break |