diff options
author | EuAndreh <eu@euandre.org> | 2025-05-02 18:34:58 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-05-02 19:10:40 -0300 |
commit | 715815e3bea7fec41a385742b0a6a8fee4c5cf99 (patch) | |
tree | e752e49b0127cae36724877174579aaff801a0c5 /tests/integration.sh | |
parent | WIP: Commit sh code as-is (diff) | |
download | gistatic-715815e3bea7fec41a385742b0a6a8fee4c5cf99.tar.gz gistatic-715815e3bea7fec41a385742b0a6a8fee4c5cf99.tar.xz |
Switch from POSIX sh to Go
Diffstat (limited to 'tests/integration.sh')
-rwxr-xr-x | tests/integration.sh | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/tests/integration.sh b/tests/integration.sh index 8fa13e9..e69de29 100755 --- a/tests/integration.sh +++ b/tests/integration.sh @@ -1,57 +0,0 @@ -#!/bin/sh -set -u - -. tests/lib.sh - -assert_file() { - if ! diff "$2" "$1"; then - printf '\n%s: File content differs.\n' \ - "$(ERROR)" >&2 - printf '\nexpected: %s\ngot: %s\n\n' "$1" "$2" >&2 - print_debug_info - exit 1 - fi -} - -test_index_generation() { - testing 'index generation' - - N="$LINENO" - OUT="$(mkstemp)" - ERR="$(mkstemp)" - DIR="$(mkdtemp)" - ./gistatic -i -o "$DIR" tests/resources/repositories/* 1>"$OUT" 2>"$ERR" - STATUS=$? - assert_empty_stdout - assert_empty_stderr - assert_status 0 - assert_file tests/resources/assets/style.css "$DIR/style.css" - assert_file tests/resources/assets/logo.svg "$DIR/logo.svg" - assert_file tests/resources/assets/index.html "$DIR/index.html" - - test_ok -} - -test_repo_generation() { - testing 'repo generation' - - N="$LINENO" - OUT="$(mkstemp)" - ERR="$(mkstemp)" - DIR="$(mkdtemp)" - ./gistatic -o "$DIR" -u https://example.com/ \ - tests/resources/repositories/repo-1 1>"$OUT" 2>"$ERR" - STATUS=$? - assert_empty_stdout - assert_empty_stderr - assert_status 0 - - assert_file tests/resources/assets/repo/style.css "$DIR/style.css" - assert_file tests/resources/assets/repo/logo.svg "$DIR/logo.svg" - assert_file tests/resources/assets/repo/refs.html "$DIR/refs.html" - - test_ok -} - -test_index_generation -test_repo_generation |