monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] net.venge.monotone.lua-5.2: 708a84ff566d014308b


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone.lua-5.2: 708a84ff566d014308bcb8f62db3d79a58f09d17
Date: Wed, 25 Apr 2012 16:25:44 +0200 (CEST)

revision:            708a84ff566d014308bcb8f62db3d79a58f09d17
date:                2012-04-25T13:34:14
author:              Richard Levitte <address@hidden>
branch:              net.venge.monotone.lua-5.2
changelog:
* test/src/testlib.lua (include, includecommon): Use the Lua function
  `dofile', available in Lua 5.1 and 5.2 alike, as we seem to do the
  exact same thing (probably old code).


manifest:
format_version "1"

new_manifest [304d4adf4fb7aa480563bb0c5012a3bff9e6692b]

old_revision [da58994936e27eb59e78dfa72680c81483270d63]

patch "test/src/testlib.lua"
 from [f236da6fce62c15acac578b42756b552e0453d99]
   to [87a3065f8f8c4712a31f4f8cfe0edc9ff9b8be3d]
============================================================
--- test/src/testlib.lua	f236da6fce62c15acac578b42756b552e0453d99
+++ test/src/testlib.lua	87a3065f8f8c4712a31f4f8cfe0edc9ff9b8be3d
@@ -326,17 +326,11 @@ function include(name)
 -- to want to include from the dir for the current test,
 -- since in that case it could just go in the driver file.
 function include(name)
-  local func, e = loadfile(testdir.."/"..name)
-  if func == nil then err(e, 2) end
-  setfenv(func, getfenv(2))
-  func()
+  dofile(testdir.."/"..name)
 end
 
 function includecommon(name)
-  local func, e = loadfile(srcdir.."/common/"..name)
-  if func == nil then err(e, 2) end
-  setfenv(func, getfenv(2))
-  func()
+  dofile(srcdir.."/common/"..name)
 end
 
 function trim(str)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]