01.exp 3.87 KB
Newer Older
Per Cederqvist's avatar
Per Cederqvist committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Check return values for a lot of functions.

lyskomd_start

client_start 0
talk_to client 0
send "A\n"
send "[holl "DejaGnu test suite"]\n"
simple_expect "LysKOM" "connected"

send "1000 62 5 [holl "bogus"] 0\n"
simple_expect "%1000 4 5"

send "1001 62 4 [holl "nono"] 0\n"
simple_expect "%1001 10 4"

send "1002 62 6 [holl "nono"] 0\n"
simple_expect "%1002 10 6"

send "1003 62 60 [holl "nono"] 0\n"
simple_expect "%1003 10 60"

send "1004 62 0 [holl "zero"] 0\n"
simple_expect "%1004 8 0"

# Turn of async messages
send "1005 80 0 { }\n"
simple_expect "=1005"

# Test that most calls fail when the user isn't logged in.

# 0:login-old may succeed
# 1:logout always succeeds
send "1006 1\n"
simple_expect "=1006"
# 2:change-conference
send "1007 2 4\n"
simple_expect "%1007 6 0"
# 3:change-name
send "1008 3 1 [holl "new name"]\n"
simple_expect "%1008 6 0"
# 4:change-what-i-am-doing
send "1009 4 [holl "testing lyskomd"]\n"
simple_expect "=1009"
# 5:create-person-old
send "1010 5 [holl "new person"] [holl "mypasswd"]\n"
simple_expect "=1010 6"
send "1011 1\n"
simple_expect "=1011"
# 6:get-person-stat-old
send "1012 6 6 1\n"
simple_expect "%1012 6 0"
# 7:set-priv-bits
send "1013 7 6 0000000000000000\n"
simple_expect "%1013 6 0"
# 8:set-passwd
send "1014 8 5 [holl "old"] [holl "new"]\n"
simple_expect "%1014 6 0"
# 9:query-read-texts-old
send "1015 9 6 6\n"
simple_expect "=1015 $any_time 6 255 0 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# 10:create-conf-old
send "1016 10 [holl "no way"] 0000\n"
simple_expect "%1016 6 0"
# 11:delete-conf
send "1017 11 1\n"
simple_expect "%1017 6 0"
# 12:lookup-name
send "1018 12 [holl "pres"]\n"
simple_expect "=1018 2 { 1 2 } { 0000 0000 }"
send "1019 12 [holl "xyzzy does not exist"]\n"
simple_expect "=1019 0 \\* \\*"
# 13:get-conf-stat-older
send "1020 13 1 0\n"
simple_expect "=1020 0H 0000 $any_time $any_time 0 0 0 0 0 0 77 0 1 0"
send "1021 13 1 1\n"
simple_expect "=1021 [holl "Presentation .av nya. mten"] 0000 $any_time $any_time 0 0 0 0 0 0 77 0 1 0"
Per Cederqvist's avatar
Per Cederqvist committed
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# 14:add-member-old
send "1022 14 4 5 255 1\n"
simple_expect "%1022 6 0"
# 15:sub-member
send "1023 15 4 5\n"
simple_expect "%1023 6 0"
# 16:set-presentation
send "1024 16 4 1\n"
simple_expect "%1024 6 0"
# 17:set-etc-motd
send "1025 17 4 1\n"
simple_expect "%1025 6 0"
# 18:set-supervisor
send "1026 18 4 1\n"
simple_expect "%1026 6 0"
# 19:set-permitted-submitters
send "1027 19 4 1\n"
simple_expect "%1027 6 0"
# 20:set-super-conf
send "1028 20 4 1\n"
simple_expect "%1028 6 0"
# 21:set-conf-type
send "1029 21 4 0000\n"
simple_expect "%1029 6 0"
send "1030 21 4 00000000\n"
simple_expect "%1030 6 0"
# 22:set-garb-nice
send "1031 22 4 17\n"
simple_expect "%1031 6 0"
# 23:get-marks
send "1032 23\n"
simple_expect "%1032 6 0"
# 24:mark-text-old
send "1033 24 1 243\n"
simple_expect "%1033 6 0"
# 25:get-text
send "1034 25 1 0 999\n"
simple_expect "%1034 14 1"
# 26:get-text-stat-old
send "1035 26 1\n"
simple_expect "%1035 14 1"
# 27:mark-as-read
send "1036 27 3 1 { 1 }\n"
simple_expect "%1036 6 0"
# 28:create-text-old
send "1037 28 [holl "A sample text"] 1 { 0 2 }\n"
simple_expect "%1037 6 0"
# 29:delete-text
send "1038 29 1\n"
simple_expect "%1038 6 0"
# 30:add-recipient
send "1039 30 1 4 0\n"
simple_expect "%1039 6 0"
# 31:sub-recipient
send "1040 31 1 4\n"
simple_expect "%1040 6 0"
Per Cederqvist's avatar
Per Cederqvist committed
134
135

# Log in
Per Cederqvist's avatar
Per Cederqvist committed
136
137
send "1041 62 5 [holl "gazonk"] 0\n"
simple_expect "=1041"
Per Cederqvist's avatar
Per Cederqvist committed
138

Per Cederqvist's avatar
Per Cederqvist committed
139
140
send "1042 9 5 5\n"
simple_expect "=1042 $any_time 5 255 0 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
141

Per Cederqvist's avatar
Per Cederqvist committed
142
143
send "1043 27 5 0 { }\n"
simple_expect "=1043"
Per Cederqvist's avatar
Per Cederqvist committed
144

Per Cederqvist's avatar
Per Cederqvist committed
145
146
send "1044 9 5 5\n"
simple_expect "=1044 $any_time 5 255 0 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
147

Per Cederqvist's avatar
Per Cederqvist committed
148
149
150
151
send "1045 6 6 1\n"
simple_expect "=1045 [holl "DejaGnu test suite.unknown.@localhost"] 0000010000000000 00000000 $any_time 0 0 1 0 0 0 0 0 0 1 0 0 1"
send "1046 6 6 0\n"
simple_expect "=1046 0H 0000010000000000 00000000 $any_time 0 0 1 0 0 0 0 0 0 1 0 0 1"
Per Cederqvist's avatar
Per Cederqvist committed
152
153
154

talk_to client 0

Per Cederqvist's avatar
Per Cederqvist committed
155
156
157
158
send "1047 42 255\n"
simple_expect "=1047" "42=enable succeeded"
send "1048 44 0\n"
simple_expect "=1048" "44=shutdown-kom succeeded"
Per Cederqvist's avatar
Per Cederqvist committed
159
160
client_death 0
lyskomd_death