aboutsummaryrefslogtreecommitdiffstats
path: root/tests/t-name-value.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/t-name-value.c')
-rw-r--r--tests/t-name-value.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/t-name-value.c b/tests/t-name-value.c
index 7a28bf4..b4c618c 100644
--- a/tests/t-name-value.c
+++ b/tests/t-name-value.c
@@ -139,6 +139,24 @@ test_getting_values (gpgrt_nvc_t pk)
e = gpgrt_nvc_lookup (pk, "SomeOtherName:");
gpgrt_assert (e);
+
+ /* The colon is optional. */
+ e = gpgrt_nvc_lookup (pk, "comment");
+ gpgrt_assert (e);
+ e = gpgrt_nvc_lookup (pk, "COMMENT");
+ gpgrt_assert (e);
+
+ e = gpgrt_nvc_lookup (pk, "SomeOtherName");
+ gpgrt_assert (e);
+
+ /* And check one which does not exist. */
+ e = gpgrt_nvc_lookup (pk, "SomeOtherNam");
+ gpgrt_assert (!e);
+ e = gpgrt_nvc_lookup (pk, "SomeOtherNam:");
+ gpgrt_assert (!e);
+ e = gpgrt_nvc_lookup (pk, "SomeOtherNam :");
+ gpgrt_assert (!e);
+
}