summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2019-03-15 14:23:46 +0000
committerPhilip Withnall <withnall@endlessm.com>2019-03-15 14:36:57 +0000
commit264617cfb539f4071e34bb3b7a07b7b02aca9963 (patch)
treeb7ba8109b8d5ba669094d53d6a644574e6fba51e
parent88d03facb952bcae205690f513f1b8229dd6c681 (diff)
downloadglib-264617cfb539f4071e34bb3b7a07b7b02aca9963.tar.gz
tests: Improve test coverage of D-Bus nonce-tcp transport addresses
Signed-off-by: Philip Withnall <withnall@endlessm.com>
-rw-r--r--gio/tests/gdbus-addresses.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gio/tests/gdbus-addresses.c b/gio/tests/gdbus-addresses.c
index 923a384ad..1638bd9f5 100644
--- a/gio/tests/gdbus-addresses.c
+++ b/gio/tests/gdbus-addresses.c
@@ -112,12 +112,18 @@ test_nonce_tcp_address (void)
assert_is_supported_address ("nonce-tcp:host=localhost,port=42,noncefile=/foo/bar");
assert_is_supported_address ("nonce-tcp:host=localhost,port=42,noncefile=/foo/bar,family=ipv6");
assert_is_supported_address ("nonce-tcp:host=localhost,port=42,noncefile=/foo/bar,family=ipv4");
+ assert_is_supported_address ("nonce-tcp:host=localhost");
assert_not_supported_address ("nonce-tcp:host=localhost,port=42,noncefile=/foo/bar,family=blah");
assert_not_supported_address ("nonce-tcp:host=localhost,port=420000,noncefile=/foo/bar,family=ipv4");
assert_not_supported_address ("nonce-tcp:host=,port=x42,noncefile=/foo/bar,family=ipv4");
assert_not_supported_address ("nonce-tcp:host=,port=42x,noncefile=/foo/bar,family=ipv4");
assert_not_supported_address ("nonce-tcp:host=,port=420000,noncefile=/foo/bar,family=ipv4");
+ assert_not_supported_address ("nonce-tcp:meaningless-key=blah");
+ assert_not_supported_address ("nonce-tcp:host=localhost,port=-1");
+ assert_not_supported_address ("nonce-tcp:host=localhost,port=420000");
+ assert_not_supported_address ("nonce-tcp:host=localhost,port=42x");
+ assert_not_supported_address ("nonce-tcp:host=localhost,port=");
}
static void