mirror of
https://github.com/hectorm/hblock.git
synced 2026-04-19 13:36:32 +05:30
24 lines
631 B
Bash
Executable file
24 lines
631 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Author: Héctor Molinero Fernández <hector@molinero.dev>
|
|
# License: MIT, https://opensource.org/licenses/MIT
|
|
# Repository: https://github.com/hectorm/hblock
|
|
|
|
set -eu
|
|
export LC_ALL='C'
|
|
|
|
SCRIPT_DIR="$(CDPATH='' cd -- "$(dirname -- "${0:?}")" && pwd -P)"
|
|
|
|
# shellcheck disable=SC1091
|
|
. "${SCRIPT_DIR:?}"/env.sh
|
|
|
|
main() {
|
|
printf 'Test - Stats: Suffixes\n'
|
|
actual="$(runInTestShell "${SCRIPT_DIR:?}/../stats/stats.sh" "${SCRIPT_DIR:?}/test-domains-stats.txt" "file://${SCRIPT_DIR:?}/psl.txt")"
|
|
expected="$(cat -- "${0%.sh}".out)"
|
|
if ! assertEquals "${actual?}" "${expected?}"; then
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
main "${@-}"
|