git: 43a04e3a0a74 - stable/13 - md5/tests: extend md5 test

From: Stefan Eßer <se_at_FreeBSD.org>
Date: Thu, 09 Feb 2023 16:52:23 UTC
The branch stable/13 has been updated by se:

URL: https://cgit.FreeBSD.org/src/commit/?id=43a04e3a0a74c609667eae382209d4ebbbcb785f

commit 43a04e3a0a74c609667eae382209d4ebbbcb785f
Author:     Stefan Eßer <se@FreeBSD.org>
AuthorDate: 2023-02-06 20:11:51 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
CommitDate: 2023-02-09 16:52:17 +0000

    md5/tests: extend md5 test
    
    The testloop function is called with various parameters, but those
    were ignored in the coreutils-c-test script. This was an oversight
    and is fixed by passing the option to all invocations of the hash
    functions in this test script.
    
    Reported by:    des
    MFC after:      3 days
    
    (cherry picked from commit d804497068c16bcb05383d7227d899f4ba59f706)
---
 sbin/md5/tests/coreutils-c-test.SH | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sbin/md5/tests/coreutils-c-test.SH b/sbin/md5/tests/coreutils-c-test.SH
index 5996e533c627..95018abd1f27 100644
--- a/sbin/md5/tests/coreutils-c-test.SH
+++ b/sbin/md5/tests/coreutils-c-test.SH
@@ -8,8 +8,8 @@ testloop () {
 	opt=$1
 
 	while read algorithm; do
-		${algorithm}sum -c %%TESTSBASE%%/sbin/md5/${algorithm}.digest || exitcode=1
-		${algorithm}sum -c %%TESTSBASE%%/sbin/md5/${algorithm}sum.digest || exitcode=1
+		${algorithm}sum $opt -c %%TESTSBASE%%/sbin/md5/${algorithm}.digest || exitcode=1
+		${algorithm}sum $opt -c %%TESTSBASE%%/sbin/md5/${algorithm}sum.digest || exitcode=1
 	done < %%TESTSBASE%%/sbin/md5/algorithms.txt
 }