From 9cf85debadce8f2fa9973fac2d608311e53d3dc4 Mon Sep 17 00:00:00 2001 From: James Roseborough Date: Fri, 7 Dec 2007 18:43:34 +0000 Subject: [PATCH] Add test cases for loadfile, dofile on bad filenames. --- src/test/res/errors.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/res/errors.lua b/src/test/res/errors.lua index a6410661..eccf982a 100644 --- a/src/test/res/errors.lua +++ b/src/test/res/errors.lua @@ -88,3 +88,7 @@ print( 'a(setmetatable({},"abc")) ', a(function() return sm({},'abc') end) ) -- bad args to error! print( 'error("msg","arg")', a(function() error('some message', 'some bad arg') end) ) + +-- loadfile, dofile on missing files +print( 'loadfile("bogus.txt")', a(function() return loadfile("bogus.txt") end) ) +print( 'dofile("bogus.txt")', a(function() return dofile("bogus.txt") end) )