blob: d4f57b0c9bc4ccb6843a6ff1a697b84ae8e0efa2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
;; Tests for jabber-xml-parse-next-stanza
(require 'jabber-xml)
(defun parse-it (text)
(with-temp-buffer
(insert text)
(jabber-xml-parse-next-stanza)))
(unless (equal
(parse-it "<presence from='foo@example.com/resource' type='unavailable' to='bar@example.com'/>")
'((presence ((from . "foo@example.com/resource") (type . "unavailable") (to . "bar@example.com")))))
(error "Testcase 1 failed"))
(unless (equal
(parse-it "<presence from='foo@example.com/resource' ")
nil)
(error "Testcase 2 failed"))
|