diff options
author | Iain Lane <iainl@gnome.org> | 2021-03-04 21:59:00 +0000 |
---|---|---|
committer | Iain Lane <iainl@gnome.org> | 2021-03-04 21:59:00 +0000 |
commit | f9061aada1b6eff651843e830406d1d8af1bd9bb (patch) | |
tree | b6902f2c3a79934f5b81d038a646dccc5a2e7825 | |
parent | f33e3661ac9396cff357fd1f27dd2bb899ccb9e2 (diff) | |
download | libsoup-f9061aada1b6eff651843e830406d1d8af1bd9bb.tar.gz |
tests/connection-test: Update expected events for GLib 2.67
See GLib commit f0a7b147806e852e2090eeda6e4e38f7d3f52b52 for full
details, but now the extra RESOLVING event is not emitted any more.
To cater for situations where libsoup is run against an older version of
GLib, keep a runtime check for older versions.
Fixes: #215
-rw-r--r-- | tests/connection-test.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/connection-test.c b/tests/connection-test.c index 7e430801..08400fb9 100644 --- a/tests/connection-test.c +++ b/tests/connection-test.c @@ -1100,6 +1100,7 @@ do_connection_connect_test (void) SoupURI *file_uri; SoupURI *wrong_http_uri; SoupURI *proxy_uri; + const char *wrong_http_uri_events; SOUP_TEST_SKIP_IF_NO_APACHE; @@ -1143,9 +1144,17 @@ do_connection_connect_test (void) debug_printf (1, " wrong http (invalid port)\n"); wrong_http_uri = soup_uri_new (HTTP_SERVER); wrong_http_uri->port = 1234; + if (glib_check_version (2, 67, 0) == NULL) { + wrong_http_uri_events = "rRc"; + } else { + /* The extra "r" here is for a GLib bug in versions before + * 2.67.0. See f0a7b147806e852e2090eeda6e4e38f7d3f52b52 in GLib + * for more details. */ + wrong_http_uri_events = "rRcr"; + } do_one_connection_connect_fail_test (session, wrong_http_uri, G_IO_ERROR, G_IO_ERROR_CONNECTION_REFUSED, - "rRcr"); /* FIXME: why r again? GLib bug? */ + wrong_http_uri_events); proxy_uri = soup_uri_new (HTTP_PROXY); g_object_set (G_OBJECT (session), |