diff --git a/completion/zsh/_ubanner b/completion/zsh/_ubanner index 669d47e..6754938 100644 --- a/completion/zsh/_ubanner +++ b/completion/zsh/_ubanner @@ -3,6 +3,8 @@ # Copyright © 2024 Christopher Bock # SPDX-License-Identifier: MIT +# SHA-256(help) = 3b402f915db43ab07d8699098cf5746bc6ce7768d32cf74cc9dac4b5ea3ee78b + local arguments arguments=( diff --git a/doc/ubanner.1 b/doc/ubanner.1 index 4df4724..696c456 100644 --- a/doc/ubanner.1 +++ b/doc/ubanner.1 @@ -1,6 +1,8 @@ .\" Copyright © 2024 Jakub Wilk .\" SPDX-License-Identifier: MIT +.\" SHA-256(help) = 3b402f915db43ab07d8699098cf5746bc6ce7768d32cf74cc9dac4b5ea3ee78b + .TH UBANNER 1 2024-03-23 "ubanner 0.1" .SH NAME ubanner \- Unicode-enabled banner(1)-like program diff --git a/t/help.t b/t/help.t index 0b73210..1191299 100755 --- a/t/help.t +++ b/t/help.t @@ -7,7 +7,7 @@ set -e -u . "${0%/*}/common.sh" -echo 1..1 +echo 1..3 xout=$( < "$dir/README" \ grep '^ [$] ubanner --help$' -A999 | @@ -28,5 +28,25 @@ else sed -e 's/^/# /' <<< "$diff" echo 'not ok 1' fi +xsum=$(sha256sum <<< "$out") +xsum=${xsum%% *} +var='SHA-256(help)' +echo "# $var = $xsum" +declare -i n=2 +t_sync() +{ + path="$1" + line=$(grep -F " $var = " < "$dir/$path") + sum=${line##*" $var = "} + if [[ $sum = $xsum ]] + then + echo ok $n "$path" + else + echo not ok $n "$path" + fi + n+=1 +} +t_sync 'completion/zsh/_ubanner' +t_sync 'doc/ubanner.1' # vim:ts=4 sts=4 sw=4 et ft=sh