libsoup: improve test
This commit is contained in:
parent
537ccc45fc
commit
35e40199a5
1 changed files with 7 additions and 1 deletions
|
@ -39,11 +39,17 @@ class Libsoup < Formula
|
|||
end
|
||||
|
||||
test do
|
||||
# if this test start failing, the problem might very well be in glib-networking instead of libsoup
|
||||
(testpath/"test.c").write <<~EOS
|
||||
#include <libsoup/soup.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
guint version = soup_get_major_version();
|
||||
SoupMessage *msg = soup_message_new("GET", "https://brew.sh");
|
||||
SoupSession *session = soup_session_new();
|
||||
soup_session_send_message(session, msg); // blocks
|
||||
g_assert_true(SOUP_STATUS_IS_SUCCESSFUL(msg->status_code));
|
||||
g_object_unref(msg);
|
||||
g_object_unref(session);
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
|
|
Loading…
Reference in a new issue