view tests/test-012-unknown-fields.sh @ 6:1c0e7f79e737

Fix incorrect field size for text fields The field size should be the string length excluding the terminating null byte which is there for convenience only when using the C API and not part of the on-disk format.
author Guido Berhoerster <guido+libpws@berhoerster.name>
date Thu, 10 Jan 2019 09:35:16 +0100
parents dfd3ddbdb201
children
line wrap: on
line source

# try to read and write header and record fields of an unknown type
$PWSDUMP -p "${TESTS_PATH}/password.txt" -n "${TESTS_PATH}/password.txt" \
    -t pws3 -o "${TESTS_OUTPUT_PATH}/unknown-fields.psafe3" \
    "${TESTS_PATH}/unknown-fields.psafe3" || exit 1
$PWSDUMP -p "${TESTS_PATH}/password.txt" \
    "${TESTS_OUTPUT_PATH}/unknown-fields.psafe3" | grep '^fe:'