diff options
author | Daiki Ueno <dueno@redhat.com> | 2017-08-08 14:52:44 +0200 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2017-08-08 16:04:40 +0200 |
commit | 04da143dce2d430dcc14e8a45c31177a23d7e301 (patch) | |
tree | 439d2c5e1aac49832ba60f73e47c75710d9c7f04 /p11-kit | |
parent | 992b6000459b9eb5159cb6826b40d7cdb6c4c412 (diff) |
test: Add checks for duplicate vendor attributes
Diffstat (limited to 'p11-kit')
-rw-r--r-- | p11-kit/test-uri.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/p11-kit/test-uri.c b/p11-kit/test-uri.c index 931c135..eb743b4 100644 --- a/p11-kit/test-uri.c +++ b/p11-kit/test-uri.c @@ -1542,6 +1542,16 @@ test_uri_vendor_query (void) ret = p11_kit_uri_set_vendor_query (uri, "my-query-three", NULL); assert_num_eq (0, ret); + /* Check if duplicate vendor query attributes are accepted and + * sorted alphabetically. */ + ret = p11_kit_uri_parse ("pkcs11:?bbb=zzz&aaa=xxx&aaa=yyy", P11_KIT_URI_FOR_ANY, uri); + assert_num_eq (P11_KIT_URI_OK, ret); + + ret = p11_kit_uri_format (uri, P11_KIT_URI_FOR_ANY, &string); + assert_num_eq (P11_KIT_URI_OK, ret); + assert_str_eq ("pkcs11:?aaa=xxx&aaa=yyy&bbb=zzz", string); + free (string); + p11_kit_uri_free (uri); } |