1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-05 09:30:35 +03:00
Files
libssh2/tests/test_read_algos.test
Daniel Stenberg f6aa31f48f provide SPDX identifiers
- All files have prominent copyright and SPDX identifier
- If not embedded in the file, in the .reuse/dep5 file
- All used licenses are in LICENSES/ (not shipped in tarballs)
- A new REUSE CI job verify that all files are OK

Assisted-by: Viktor Szakats

Closes #1084
2023-06-07 08:18:55 +02:00

37 lines
708 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright (C) Viktor Szakats
# SPDX-License-Identifier: BSD-3-Clause
set -e
set -u
# https://testanything.org/tap-specification.html
testbin="./test_read${EXEEXT:-}"
d="$(dirname "$0")"
algos="$(tr -d $"\r" < "${d}/test_read_algos.txt")"
count=1
total="$(echo "${algos}" | wc -l | tr -d ' ')"
echo "${count}..${total}"
while read -r test; do
if [[ "${test}" = *'mac-'* ]]; then
if FIXTURE_TEST_MAC="${test}" "${testbin}"; then
res='ok'
else
res='not ok'
fi
else
if FIXTURE_TEST_CRYPT="${test}" "${testbin}"; then
res='ok'
else
res='not ok'
fi
fi
echo "${res} ${count} - test_read-${test}"
((count++))
done <<< "${algos}"