From: Ian Jackson Date: Tue, 27 Oct 2015 18:59:21 +0000 (+0000) Subject: Testing: Log in X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=cgi-auth-flexible.git;a=commitdiff_plain;h=280e622b7999a87832ba3c4d4e36c23a6a569cb6 Testing: Log in Signed-off-by: Ian Jackson --- diff --git a/tests/autotest b/tests/autotest index 0d84c63..29863bc 100755 --- a/tests/autotest +++ b/tests/autotest @@ -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 diff --git a/tests/cgi b/tests/cgi index b73e6aa..1610e8d 100755 --- a/tests/cgi +++ b/tests/cgi @@ -48,7 +48,7 @@ Content-Type: text/html Set-Cookie: $cookie TITLE -

H1

+

ACCESSGRANTED

again

info