Some checks failed
CI Code / Linux (debian) (pull_request) Waiting to run
CI Code / Linux (ubuntu) (pull_request) Waiting to run
CI Code / Check spelling (pull_request) Successful in 20s
CI Code / Check coding style (pull_request) Successful in 34s
CI Code / Linux (arch) (pull_request) Failing after 3h11m46s
Remove dependency on libexpect which had a segfault bug on Arch Linux. - Replace exp_spawnl() with forkpty() for PTY creation - Replace exp_expectl() with custom POSIX regex matching - Update configure.ac to check for forkpty() instead of libexpect - Update Makefile.am to link with libutil instead of libexpect/libtcl - Remove expect/tcl packages from all Dockerfiles - Add Valgrind suppressions for stabber/pthread false positives
35 lines
1.0 KiB
C
35 lines
1.0 KiB
C
#include <glib.h>
|
|
#include "prof_cmocka.h"
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#include <stabber.h>
|
|
|
|
#include "proftest.h"
|
|
|
|
void
|
|
rooms_query(void **state)
|
|
{
|
|
stbbr_for_query("http://jabber.org/protocol/disco#items",
|
|
"<iq id='*' type='result' to='stabber@localhost/profanity' from='conference.localhost'>"
|
|
"<query xmlns='http://jabber.org/protocol/disco#items'>"
|
|
"<item jid='chatroom@conference.localhost' name='A chat room'/>"
|
|
"<item jid='hangout@conference.localhost' name='Another chat room'/>"
|
|
"</query>"
|
|
"</iq>"
|
|
);
|
|
|
|
prof_connect();
|
|
|
|
prof_input("/rooms service conference.localhost");
|
|
|
|
assert_true(prof_output_exact("chatroom@conference.localhost (A chat room)"));
|
|
assert_true(prof_output_exact("hangout@conference.localhost (Another chat room)"));
|
|
|
|
assert_true(stbbr_received(
|
|
"<iq id='*' to='conference.localhost' type='get'>"
|
|
"<query xmlns='http://jabber.org/protocol/disco#items'/>"
|
|
"</iq>"
|
|
));
|
|
}
|