=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/
+
+
+
+
+
+
Test not started.
+
+
+
+
+
+
+ Test | Result |
+ 1 | not started |
+ 2 | not started |
+ 3 | not started |
+ 4 | not started |
+ 5 | not started |
+ 6 | not started |
+ 7 | not started |
+ 8 | not started |
+ 9 | not started |
+ 10 | not started |
+
+ Push [Test] to start.
+
+
+
diff --git a/test/page2.lp b/test/page2.lp
new file mode 100644
index 00000000..db1b6fcf
--- /dev/null
+++ b/test/page2.lp
@@ -0,0 +1,65 @@
+ mg.write("HTTP/1.0 200 OK") ?>
+ mg.write("Content-Type: text/html") ?>
+
+
+
+This is another example of a Lua server page, served by
+Civetweb web server.
+
+The following features are available:
+
+
+ -- function in one Lua tag should still be available in the next one
+ function test(tab, name)
+ if tab then
+ mg.write("- " .. name .. "
")
+ end
+ end
+ function recurse(tab)
+ mg.write("")
+ for k,v in pairs(tab) do
+ if type(v) == "table" then
+ mg.write("- " .. tostring(k) .. ":
")
+ recurse(v)
+ else
+ mg.write("- " .. tostring(k) .. " = " .. tostring(v) .. "
")
+ end
+ end
+ mg.write("
")
+ end
+?>
+
+ mg.write("- " .. _VERSION .. " with the following standard libraries
")
+ mg.write("")
+ libs = {"string", "math", "table", "io", "os", "bit32", "package", "coroutine", "debug"};
+ for _,n in ipairs(libs) do
+ test(_G[n], n);
+ end
+ mg.write("
")
+ test(sqlite3, "sqlite3 binding")
+ test(lfs,"lua file system")
+
+ libname = "mg"
+ test(_G[libname], libname .. " library")
+ recurse(_G[libname])
+?>
+
+ Today is mg.write(os.date("%A")) ?>
+
+
+
+ -- for k,v in pairs(_G) do mg.write(k, '\n') end
+
+ if lfs then
+ mg.write("Files in " .. lfs.currentdir())
+ mg.write("
")
+ for f in lfs.dir(".") do
+ mg.write("- " .. f .. "
")
+ local at = lfs.attributes(f);
+ recurse(at)
+ end
+ mg.write("
")
+ end
+?>
+
+