Skip to content

Commit

Permalink
Add test for p11-kit generate-keypair command
Browse files Browse the repository at this point in the history
Signed-off-by: Zoltan Fridrich <[email protected]>
  • Loading branch information
ZoltanFridrich committed Sep 15, 2023
1 parent ef0bfea commit ca5ed35
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion p11-kit/test-objects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,18 @@ EOF
fi
}

test_generate_keypair() {
cat > list.exp <<EOF
EOF

"$abs_top_builddir"/p11-kit/p11-kit-testable generate-keypair -q --type=mock "pkcs11:" > list.out

: ${DIFF=diff}
if ! ${DIFF} list.exp list.out > list.diff; then
sed 's/^/# /' list.diff
assert_fail "output contains wrong result"
fi
}

run test_list_all test_list_with_type test_list_exact test_list_nonexistent \
test_export_cert test_export_pubkey
test_export_cert test_export_pubkey test_generate_keypair

0 comments on commit ca5ed35

Please sign in to comment.