UnitTest( request.asp )

Output

(Empty)  -- isEmpty? True, isNull? False

(IStringList)  -- isEmpty? True, isNull? False
(Long) 0 -- isEmpty? False, isNull? False
(Empty)  -- isEmpty? True, isNull? False

(IStringList)  -- isEmpty? True, isNull? False
(Long) 0 -- isEmpty? False, isNull? False
(Empty)  -- isEmpty? True, isNull? False

(IStringList)  -- isEmpty? True, isNull? False
(Long) 0 -- isEmpty? False, isNull? False
(Empty)  -- isEmpty? True, isNull? False

Sources

/request.asp

<!--#include virtual="/lib/unit-tests.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="en">
    <head>
        <title>Unit Test - Request</title>
        <!--// meta tags //-->
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <!--// link tags //-->
        <link rel="stylesheet" type="text/css" media="screen" href="/lib/unit-tests.css" />
    </head>
    <body>
        <div id="container">
            <div id="container-hd">
                <h1>UnitTest( request.asp )</h1>
            </div>
            <div id="container-bd">
 
<h2>Output</h2>
<div class="code"><pre><%
 
' example: http://192.168.0.20:51000/request.asp?foo=bar&foo=baz&grob
 
dim v
 
v = Request.QueryString("foo")()
Response.write( chk(v) )
 
Response.write( vbNewline )
 
Response.write( chk( Request.QueryString("foo") ) )
Response.write( chk( Request.QueryString("foo").count ) )
Response.write( chk( Request.QueryString("foo")() ) )
 
Response.write( vbNewline )
 
Response.write( chk( Request.QueryString("grob") ) )
Response.write( chk( Request.QueryString("grob").count ) )
Response.write( chk( Request.QueryString("grob")() ) )
 
Response.write( vbNewline )
 
Response.write( chk( Request.QueryString("xxx") ) )
Response.write( chk( Request.QueryString("xxx").count ) )
Response.write( chk( Request.QueryString("xxx")() ) )
 
' helpers
 
function [](byVal template, byRef values)
    [] = strsubstitute(template, values)
end function
 
function chk(byRef thing)
    chk = []( "{0} -- isEmpty? {1}, isNull? {2}{3}", array( dump(thing), isEmpty(thing), isNull(thing), vbNewline ) )
end function
 
%></pre></div>
 
            </div>
            <div id="container-ft">
                <h2>Sources</h2>
                <h3><%= Request.ServerVariables("SCRIPT_NAME") %></h3>
                <div class="code"><%= geshify( loadTextFile( Server.mapPath( Request.ServerVariables("SCRIPT_NAME") ) ), "asp" ) %></div>
            </div>
        </div>
        <!--// javascript tags //-->
    </body>
</html>