diff options
author | Lua Team <team@lua.org> | 2005-05-20 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2005-05-20 12:00:00 +0000 |
commit | bf6b5550cdfbc0c4a3a4577776ad76628d80718e (patch) | |
tree | d714ef8ac5581536c0f8bb2c8e90e2b8207799b1 /test | |
parent | e6ddfd3b09c0a3727afc773029c323a3defe50fa (diff) | |
download | lua-github-5.1-work6.tar.gz |
Lua 5.1-work65.1-work6
Diffstat (limited to 'test')
-rw-r--r-- | test/README | 1 | ||||
-rw-r--r-- | test/luac.lua | 4 | ||||
-rw-r--r-- | test/undefined.lua | 9 |
3 files changed, 2 insertions, 12 deletions
diff --git a/test/README b/test/README index 2a6601c5..0c7f38bc 100644 --- a/test/README +++ b/test/README @@ -22,6 +22,5 @@ Here is a one-line summary of each program: table.lua make table, grouping all data for the same item trace-calls.lua trace calls trace-globals.lua trace assigments to global variables - undefined.lua catch "undefined" global variables xd.lua hex dump diff --git a/test/luac.lua b/test/luac.lua index b009ae9d..adae1b29 100644 --- a/test/luac.lua +++ b/test/luac.lua @@ -3,5 +3,5 @@ assert(arg[1]~=nil and arg[2]==nil,"usage: lua luac.lua file.lua") f=assert(io.open("luac.out","wb")) -f:write(string.dump(assert(loadfile(arg[1])))) -io.close(f) +assert(f:write(string.dump(assert(loadfile(arg[1]))))) +assert(io.close(f)) diff --git a/test/undefined.lua b/test/undefined.lua deleted file mode 100644 index efe5f245..00000000 --- a/test/undefined.lua +++ /dev/null @@ -1,9 +0,0 @@ --- catch "undefined" global variables - -local f=function (t,i) error("undefined global variable `"..i.."'",2) end -setmetatable(getfenv(),{__index=f}) - --- an example -a=1 -c=3 -print(a,b,c) -- `b' is undefined |