chiark / gitweb /
Testing: Log in
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 27 Oct 2015 18:59:21 +0000 (18:59 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 27 Oct 2015 18:59:21 +0000 (18:59 +0000)
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
tests/autotest
tests/cgi

index 0d84c63ffa91934d15bb384beb0c5714e85a7c46..29863bca319e34197e17cb6220731e2786ae6512 100755 (executable)
@@ -37,11 +37,28 @@ proc etxt {str} {
      elog -re $str
 }
 
-etxt {You need to log in}
-etxt {Source available}
+proc epage {str} {
+    etxt $str
+}
+
+epage {You need to log in}
+
+proc fillformfield {value} {
+    send "\t\r$value\r"
+}
+
+proc submitform-expect {wanttxt} {
+    send "\t\r"
+    etxt "loading file"
+    epage $wanttxt
+}
+
+fillformfield alice
+fillformfield bogus
+submitform-expect "wrong password"
 
-send "\t\ralice\r\t\rbogus\r\t\r"
-etxt "loading file"
-etxt "wrong password"
+fillformfield alice
+fillformfield sesame
+submitform-expect "ACCESSGRANTED"
 
 puts ok
index b73e6aae57a0f4a7dcdc51e12df9c28ae5b19b71..1610e8d9c46b6db690f5b6e32bd419f7fa16bed2 100755 (executable)
--- a/tests/cgi
+++ b/tests/cgi
@@ -48,7 +48,7 @@ Content-Type: text/html
 Set-Cookie: $cookie
 
 <html><head><title>TITLE</title></head>
-<body><h1>H1</h1>
+<body><h1>ACCESSGRANTED</h1>
 <h1>again</h1>
 
 <h1>info<h1>