lynx/tests/lynx-dump/sync.sh
Kamil Dudka 5bdda90d01 Resolves: CVE-2021-38165 - implement a gating test
... based on `fmf` and `tmt`
2021-10-15 10:12:52 +02:00

27 lines
543 B
Bash
Executable File

#!/bin/bash
# exit immediately if any command returns non-zero exit code
set -e
# print commands as they are executed by the shell interpreter
set -x
# set locale
export LC_ALL=C
locale
# print basic info about lynx
rpm -q lynx
command -v lynx
lynx --version
ldd /usr/bin/lynx
# iterate over all input HTML files
for tst in data/*.html; do
# dump their content as plain-text using lynx
lynx -dump file://localhost${PWD}/${tst} > ${tst}.exp
# drop absolute paths from the output
sed -e 's|file://.*$||' -i ${tst}.exp
done