chiark / gitweb /
Testing: Break out srcdump-prep
[cgi-auth-flexible.git] / tests / loginout.at
1 # -*- Tcl -*-
2
3 # This is part of CGI::Auth::Flexible, a perl CGI authentication module.
4 #
5 # Copyright 2012,2013,2015 Ian Jackson.
6 # Copyright 2012,2013,2015 Citrix.
7 #
8 # This program is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU Affero General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version, with the "CAF Login Exception"
12 # as published by Ian Jackson (version 1, or at your option any 
13 # later version) as an Additional Permission.
14 #
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU Affero General Public License for more details.
19
20 dospawn
21
22 loginas alice bogus "wrong password"
23
24 loginas alice
25
26 etxt {path = '/Tsuffix'}
27
28 send "/Make worms\r"
29 submitform-expect "MAKING-worms"
30
31 send "/Logout\r"
32 submitform-expect "You have been logged out"
33
34 send "B\x10/Make sponges\r"
35 submitform-expect "You need to log in"
36
37 loginas bob
38
39 send "/Logout\r"
40 submitform-expect "You have been logged out"
41
42 send "/Log in again\r"
43 submitform-expect "need to log in"
44
45 loginas bob
46
47 send "BBB\x10/Make sponges\r"
48 submitform-expect "Login session interrupted"