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 0d84c63..29863bc 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 b73e6aa..1610e8d 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>