blob 168569f5481cdef616055633c64f3319202793e0 11090 bytes (raw)
name: test/lisp/erc/erc-d/erc-d-self-resources/irc-parser-tests.eld # note: path name is non-authoritative(*)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
| | ;;; -*- mode: lisp-data; -*-
;; https://github.com/DanielOaks/irc-parser-tests
((mask-match
(tests
((mask . "*@127.0.0.1")
(matches "coolguy!ab@127.0.0.1" "cooldud3!~bc@127.0.0.1")
(fails "coolguy!ab@127.0.0.5" "cooldud3!~d@124.0.0.1"))
((mask . "cool*@*")
(matches "coolguy!ab@127.0.0.1" "cooldud3!~bc@127.0.0.1" "cool132!ab@example.com")
(fails "koolguy!ab@127.0.0.5" "cooodud3!~d@124.0.0.1"))
((mask . "cool!*@*")
(matches "cool!guyab@127.0.0.1" "cool!~dudebc@127.0.0.1" "cool!312ab@example.com")
(fails "coolguy!ab@127.0.0.1" "cooldud3!~bc@127.0.0.1" "koolguy!ab@127.0.0.5" "cooodud3!~d@124.0.0.1"))
((mask . "cool!?username@*")
(matches "cool!ausername@127.0.0.1" "cool!~username@127.0.0.1")
(fails "cool!username@127.0.0.1"))
((mask . "cool!a?*@*")
(matches "cool!ab@127.0.0.1" "cool!abc@127.0.0.1")
(fails "cool!a@127.0.0.1"))
((mask . "cool[guy]!*@*")
(matches "cool[guy]!guy@127.0.0.1" "cool[guy]!a@example.com")
(fails "coolg!ab@127.0.0.1" "cool[!ac@127.0.1.1"))))
(msg-join
(tests
((desc . "Simple test with verb and params.")
(atoms
(verb . "foo")
(params "bar" "baz" "asdf"))
(matches "foo bar baz asdf" "foo bar baz :asdf"))
((desc . "Simple test with source and no params.")
(atoms
(source . "src")
(verb . "AWAY"))
(matches ":src AWAY"))
((desc . "Simple test with source and empty trailing param.")
(atoms
(source . "src")
(verb . "AWAY")
(params ""))
(matches ":src AWAY :"))
((desc . "Simple test with source.")
(atoms
(source . "coolguy")
(verb . "foo")
(params "bar" "baz" "asdf"))
(matches ":coolguy foo bar baz asdf" ":coolguy foo bar baz :asdf"))
((desc . "Simple test with trailing param.")
(atoms
(verb . "foo")
(params "bar" "baz" "asdf quux"))
(matches "foo bar baz :asdf quux"))
((desc . "Simple test with empty trailing param.")
(atoms
(verb . "foo")
(params "bar" "baz" ""))
(matches "foo bar baz :"))
((desc . "Simple test with trailing param containing colon.")
(atoms
(verb . "foo")
(params "bar" "baz" ":asdf"))
(matches "foo bar baz ::asdf"))
((desc . "Test with source and trailing param.")
(atoms
(source . "coolguy")
(verb . "foo")
(params "bar" "baz" "asdf quux"))
(matches ":coolguy foo bar baz :asdf quux"))
((desc . "Test with trailing containing beginning+end whitespace.")
(atoms
(source . "coolguy")
(verb . "foo")
(params "bar" "baz" " asdf quux "))
(matches ":coolguy foo bar baz : asdf quux "))
((desc . "Test with trailing containing what looks like another trailing param.")
(atoms
(source . "coolguy")
(verb . "PRIVMSG")
(params "bar" "lol :) "))
(matches ":coolguy PRIVMSG bar :lol :) "))
((desc . "Simple test with source and empty trailing.")
(atoms
(source . "coolguy")
(verb . "foo")
(params "bar" "baz" ""))
(matches ":coolguy foo bar baz :"))
((desc . "Trailing contains only spaces.")
(atoms
(source . "coolguy")
(verb . "foo")
(params "bar" "baz" " "))
(matches ":coolguy foo bar baz : "))
((desc . "Param containing tab (tab is not considered SPACE for message splitting).")
(atoms
(source . "coolguy")
(verb . "foo")
(params "b ar" "baz"))
(matches ":coolguy foo b ar baz" ":coolguy foo b ar :baz"))
((desc . "Tag with no value and space-filled trailing.")
(atoms
(tags
(asd . ""))
(source . "coolguy")
(verb . "foo")
(params "bar" "baz" " "))
(matches "@asd :coolguy foo bar baz : "))
((desc . "Tags with escaped values.")
(atoms
(verb . "foo")
(tags
(a . "b\\and\nk")
(d . "gh;764")))
(matches "@a=b\\\\and\\nk;d=gh\\:764 foo" "@d=gh\\:764;a=b\\\\and\\nk foo"))
((desc . "Tags with escaped values and params.")
(atoms
(verb . "foo")
(tags
(a . "b\\and\nk")
(d . "gh;764"))
(params "par1" "par2"))
(matches "@a=b\\\\and\\nk;d=gh\\:764 foo par1 par2" "@a=b\\\\and\\nk;d=gh\\:764 foo par1 :par2" "@d=gh\\:764;a=b\\\\and\\nk foo par1 par2" "@d=gh\\:764;a=b\\\\and\\nk foo par1 :par2"))
((desc . "Tag with long, strange values (including LF and newline).")
(atoms
(tags
(foo . "\\\\;\\s \r\n"))
(verb . "COMMAND"))
(matches "@foo=\\\\\\\\\\:\\\\s\\s\\r\\n COMMAND"))))
(msg-split
(tests
((input . "foo bar baz asdf")
(atoms
(verb . "foo")
(params "bar" "baz" "asdf")))
((input . ":coolguy foo bar baz asdf")
(atoms
(source . "coolguy")
(verb . "foo")
(params "bar" "baz" "asdf")))
((input . "foo bar baz :asdf quux")
(atoms
(verb . "foo")
(params "bar" "baz" "asdf quux")))
((input . "foo bar baz :")
(atoms
(verb . "foo")
(params "bar" "baz" "")))
((input . "foo bar baz ::asdf")
(atoms
(verb . "foo")
(params "bar" "baz" ":asdf")))
((input . ":coolguy foo bar baz :asdf quux")
(atoms
(source . "coolguy")
(verb . "foo")
(params "bar" "baz" "asdf quux")))
((input . ":coolguy foo bar baz : asdf quux ")
(atoms
(source . "coolguy")
(verb . "foo")
(params "bar" "baz" " asdf quux ")))
((input . ":coolguy PRIVMSG bar :lol :) ")
(atoms
(source . "coolguy")
(verb . "PRIVMSG")
(params "bar" "lol :) ")))
((input . ":coolguy foo bar baz :")
(atoms
(source . "coolguy")
(verb . "foo")
(params "bar" "baz" "")))
((input . ":coolguy foo bar baz : ")
(atoms
(source . "coolguy")
(verb . "foo")
(params "bar" "baz" " ")))
((input . "@a=b;c=32;k;rt=ql7 foo")
(atoms
(verb . "foo")
(tags
(a . "b")
(c . "32")
(k . "")
(rt . "ql7"))))
((input . "@a=b\\\\and\\nk;c=72\\s45;d=gh\\:764 foo")
(atoms
(verb . "foo")
(tags
(a . "b\\and\nk")
(c . "72 45")
(d . "gh;764"))))
((input . "@c;h=;a=b :quux ab cd")
(atoms
(tags
(c . "")
(h . "")
(a . "b"))
(source . "quux")
(verb . "ab")
(params "cd")))
((input . ":src JOIN #chan")
(atoms
(source . "src")
(verb . "JOIN")
(params "#chan")))
((input . ":src JOIN :#chan")
(atoms
(source . "src")
(verb . "JOIN")
(params "#chan")))
((input . ":src AWAY")
(atoms
(source . "src")
(verb . "AWAY")))
((input . ":src AWAY ")
(atoms
(source . "src")
(verb . "AWAY")))
((input . ":cool guy foo bar baz")
(atoms
(source . "cool guy")
(verb . "foo")
(params "bar" "baz")))
((input . ":coolguy!ag@net\x035w\x03ork.admin PRIVMSG foo :bar baz")
(atoms
(source . "coolguy!ag@net\x035w\x03ork.admin")
(verb . "PRIVMSG")
(params "foo" "bar baz")))
((input . ":coolguy!~ag@n\x02et\x0305w\x0fork.admin PRIVMSG foo :bar baz")
(atoms
(source . "coolguy!~ag@n\x02et\x0305w\x0fork.admin")
(verb . "PRIVMSG")
(params "foo" "bar baz")))
((input . "@tag1=value1;tag2;vendor1/tag3=value2;vendor2/tag4= :irc.example.com COMMAND param1 param2 :param3 param3")
(atoms
(tags
(tag1 . "value1")
(tag2 . "")
(vendor1/tag3 . "value2")
(vendor2/tag4 . ""))
(source . "irc.example.com")
(verb . "COMMAND")
(params "param1" "param2" "param3 param3")))
((input . ":irc.example.com COMMAND param1 param2 :param3 param3")
(atoms
(source . "irc.example.com")
(verb . "COMMAND")
(params "param1" "param2" "param3 param3")))
((input . "@tag1=value1;tag2;vendor1/tag3=value2;vendor2/tag4 COMMAND param1 param2 :param3 param3")
(atoms
(tags
(tag1 . "value1")
(tag2 . "")
(vendor1/tag3 . "value2")
(vendor2/tag4 . ""))
(verb . "COMMAND")
(params "param1" "param2" "param3 param3")))
((input . "COMMAND")
(atoms
(verb . "COMMAND")))
((input . "@foo=\\\\\\\\\\:\\\\s\\s\\r\\n COMMAND")
(atoms
(tags
(foo . "\\\\;\\s \r\n"))
(verb . "COMMAND")))
((input . ":gravel.mozilla.org 432 #momo :Erroneous Nickname: Illegal characters")
(atoms
(source . "gravel.mozilla.org")
(verb . "432")
(params "#momo" "Erroneous Nickname: Illegal characters")))
((input . ":gravel.mozilla.org MODE #tckk +n ")
(atoms
(source . "gravel.mozilla.org")
(verb . "MODE")
(params "#tckk" "+n")))
((input . ":services.esper.net MODE #foo-bar +o foobar ")
(atoms
(source . "services.esper.net")
(verb . "MODE")
(params "#foo-bar" "+o" "foobar")))
((input . "@tag1=value\\\\ntest COMMAND")
(atoms
(tags
(tag1 . "value\\ntest"))
(verb . "COMMAND")))
((input . "@tag1=value\\1 COMMAND")
(atoms
(tags
(tag1 . "value1"))
(verb . "COMMAND")))
((input . "@tag1=value1\\ COMMAND")
(atoms
(tags
(tag1 . "value1"))
(verb . "COMMAND")))
((input . "@tag1=1;tag2=3;tag3=4;tag1=5 COMMAND")
(atoms
(tags
(tag1 . "5")
(tag2 . "3")
(tag3 . "4"))
(verb . "COMMAND")))
((input . "@tag1=1;tag2=3;tag3=4;tag1=5;vendor/tag2=8 COMMAND")
(atoms
(tags
(tag1 . "5")
(tag2 . "3")
(tag3 . "4")
(vendor/tag2 . "8"))
(verb . "COMMAND")))
((input . ":SomeOp MODE #channel :+i")
(atoms
(source . "SomeOp")
(verb . "MODE")
(params "#channel" "+i")))
((input . ":SomeOp MODE #channel +oo SomeUser :AnotherUser")
(atoms
(source . "SomeOp")
(verb . "MODE")
(params "#channel" "+oo" "SomeUser" "AnotherUser")))))
(userhost-split
(tests
((source . "coolguy")
(atoms
(nick . "coolguy")))
((source . "coolguy!ag@127.0.0.1")
(atoms
(nick . "coolguy")
(user . "ag")
(host . "127.0.0.1")))
((source . "coolguy!~ag@localhost")
(atoms
(nick . "coolguy")
(user . "~ag")
(host . "localhost")))
((source . "coolguy@127.0.0.1")
(atoms
(nick . "coolguy")
(host . "127.0.0.1")))
((source . "coolguy!ag")
(atoms
(nick . "coolguy")
(user . "ag")))
((source . "coolguy!ag@net\x035w\x03ork.admin")
(atoms
(nick . "coolguy")
(user . "ag")
(host . "net\x035w\x03ork.admin")))
((source . "coolguy!~ag@n\x02et\x0305w\x0fork.admin")
(atoms
(nick . "coolguy")
(user . "~ag")
(host . "n\x02et\x0305w\x0fork.admin")))))
(validate-hostname
(tests
((host . "irc.example.com")
(valid . t))
((host . "i.coolguy.net")
(valid . t))
((host . "irc-srv.net.uk")
(valid . t))
((host . "iRC.CooLguY.NeT")
(valid . t))
((host . "gsf.ds342.co.uk")
(valid . t))
((host . "324.net.uk")
(valid . t))
((host . "xn--bcher-kva.ch")
(valid . t))
((host . "-lol-.net.uk")
(valid . :false))
((host . "-lol.net.uk")
(valid . :false))
((host . "_irc._sctp.lol.net.uk")
(valid . :false))
((host . "irc")
(valid . :false))
((host . "com")
(valid . :false))
((host . "")
(valid . :false)))))
|
debug log:
solving 168569f548 ...
found 168569f548 in https://git.savannah.gnu.org/cgit/emacs.git
(*) Git path names are given by the tree(s) the blob belongs to.
Blobs themselves have no identifier aside from the hash of its contents.^
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.