abuild-tar: add test for --hash

This commit is contained in:
Natanael Copa 2022-11-30 13:02:18 +01:00
parent 9aeb6484b6
commit f97bf6ae8b
1 changed files with 10 additions and 1 deletions

View File

@ -4,7 +4,8 @@
init_tests \
abuild_tar_help \
abuild_tar_invalid_opt \
abuild_tar_cut
abuild_tar_cut \
abuild_tar_hash
DATADIR=$(atf_get_srcdir)/testdata
@ -38,3 +39,11 @@ abuild_tar_cut_body() {
tar -tf foobar.tar
}
abuild_tar_hash_body() {
atf_require_prog tar strings
echo foo > foo
tar --format=posix -cf - foo | abuild-tar --hash > foo.tar
atf_check -o match:foo tar -tvf foo.tar
atf_check -o match:"APK-TOOLS.checksum" strings foo.tar
}