tests: Fix notation tests.
* lang/python/tests/t-sig-notation.py (check_result): Check critical
flag.
* tests/gpg/t-sig-notation.c (check_result): Likewise.
Fixes-commit: 1cacd7d0
Signed-off-by: Justus Winter <justus@gnupg.org>
This commit is contained in:
parent
1cacd7d00a
commit
c88c9ef384
@ -44,9 +44,8 @@ def check_result(result):
|
|||||||
"Expected {!r}, got {!r}".format(value, r.value)
|
"Expected {!r}, got {!r}".format(value, r.value)
|
||||||
assert r.human_readable \
|
assert r.human_readable \
|
||||||
== bool(flags&constants.SIG_NOTATION_HUMAN_READABLE)
|
== bool(flags&constants.SIG_NOTATION_HUMAN_READABLE)
|
||||||
# xxx notyet
|
assert r.critical \
|
||||||
#assert r.human_readable \
|
== bool(flags&constants.SIG_NOTATION_CRITICAL)
|
||||||
# == bool(flags&constants.SIG_NOTATION_CRITICAL)
|
|
||||||
|
|
||||||
assert len(expected_notations) == 0
|
assert len(expected_notations) == 0
|
||||||
|
|
||||||
|
@ -83,11 +83,11 @@ check_result (gpgme_verify_result_t result)
|
|||||||
&& r->value
|
&& r->value
|
||||||
&& !strcmp (r->value, expected_notations[i].value)
|
&& !strcmp (r->value, expected_notations[i].value)
|
||||||
&& r->value_len == strlen (expected_notations[i].value)
|
&& r->value_len == strlen (expected_notations[i].value)
|
||||||
&& r->flags
|
&& r->flags == expected_notations[i].flags
|
||||||
== (expected_notations[i].flags & ~GPGME_SIG_NOTATION_CRITICAL)
|
|
||||||
&& r->human_readable
|
&& r->human_readable
|
||||||
== !!(r->flags & GPGME_SIG_NOTATION_HUMAN_READABLE)
|
== !!(r->flags & GPGME_SIG_NOTATION_HUMAN_READABLE)
|
||||||
&& r->critical == 0)
|
&& r->critical
|
||||||
|
== !!(r->flags & GPGME_SIG_NOTATION_CRITICAL))
|
||||||
{
|
{
|
||||||
expected_notations[i].seen++;
|
expected_notations[i].seen++;
|
||||||
any++;
|
any++;
|
||||||
|
Loading…
Reference in New Issue
Block a user