From fdf45e87dea227d920698370657e62fdf3208579 Mon Sep 17 00:00:00 2001
From: Philipp Gesang <phg42.2a@gmail.com>
Date: Wed, 8 May 2013 15:46:15 +0200
Subject: add test

---
 lualibs.dtx | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

(limited to 'lualibs.dtx')

diff --git a/lualibs.dtx b/lualibs.dtx
index b8fe169..b8c74c0 100644
--- a/lualibs.dtx
+++ b/lualibs.dtx
@@ -450,13 +450,9 @@ lualibs.module_info = {
 config           = config or { }
 config.lualibs   = config.lualibs or { }
 
-if config.lualibs.prefer_merged == nil then
-  lualibs.prefer_merged = true
-end
-if config.lualibs.load_extended == nil then
-  lualibs.load_extended = true
-end
-config.lualibs.verbose = config.lualibs.verbose == false
+lualibs.prefer_merged   = config.lualibs.prefer_merged or true
+lualibs.load_extended   = config.lualibs.load_extended or true
+config.lualibs.verbose  = config.lualibs.verbose       or false
 
 %    \end{macrocode}
 %     The lualibs may be loaded in scripts.
@@ -526,13 +522,17 @@ lualibs.loadmodule = loadmodule
 %
 %    \begin{macrocode}
 
-if lualibs.basic_loaded ~= true then
+if lualibs.basic_loaded        ~= true
+or config.lualibs.force_reload == true
+then
   loadmodule"lualibs-basic.lua"
   loadmodule"lualibs-compat.lua" --- restore stuff gone since v1.*
 end
 
-if  lualibs.load_extended   == true
-and lualibs.extended_loaded ~= true then
+if  lualibs.load_extended       == true
+and lualibs.extended_loaded     ~= true
+or  config.lualibs.force_reload == true
+then
   loadmodule"lualibs-extended.lua"
 end
 
-- 
cgit v1.2.3

