WIP: testing #96

Draft
emma wants to merge 23 commits from testing into main
Showing only changes of commit 8508479a5b - Show all commits

View File

@ -17,8 +17,6 @@ then
exit 1
fi
printf "Starting Bonsai testing.\n\n"
for script in tests/bonsai/*.sh; do
emma marked this conversation as resolved
Review

This seems ineligant. Programmatically print the test suite name at tests/$suite/Name, falling back to the folder name itself.

for suite in tests/*; do
    if ! scrut -d "$suite"
        then continue
    fi
    s="$suite" sh -c '
            scrut -e "$s"/Name \
                && mm <"$s/Name" \
                || printf "%s\n" "$s"'
        | xargs printf 'Testing <%s>...\n'
    # testing stuff
done
This seems ineligant. Programmatically print the test suite name at `tests/$suite/Name`, falling back to the folder name itself. ```sh for suite in tests/*; do if ! scrut -d "$suite" then continue fi s="$suite" sh -c ' scrut -e "$s"/Name \ && mm <"$s/Name" \ || printf "%s\n" "$s"' | xargs printf 'Testing <%s>...\n' # testing stuff done
export UTIL="$(printf '%s\n' "$script" \
| sed -e 's/\.sh//g' -e 's;tests\/bonsai\/;;g')"
@ -28,8 +26,6 @@ for script in tests/bonsai/*.sh; do
printf '\n'
done
printf "Starting POSIX compatibility testing.\n\n"
for test in tests/posix/*.sh; do
export PATH="$BIN:$PATH"
printf '%s: %s: Testing utility.\n' "$0" "$test"
emma marked this conversation as resolved Outdated

This should go before the previous for loop as it will crash faster on incorrect invocation.

This should go before the previous `for` loop as it will crash faster on incorrect invocation.