From f97bf6ae8b5709087926b0af068ebe34e80d0c2d Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 30 Nov 2022 13:02:18 +0100 Subject: [PATCH] abuild-tar: add test for --hash --- tests/abuild_tar_test | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/abuild_tar_test b/tests/abuild_tar_test index dcb743f..e50b823 100755 --- a/tests/abuild_tar_test +++ b/tests/abuild_tar_test @@ -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 +}