1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#!/bin/bash
# Always run the tests from this script's folder
cd "$(dirname "$0")" || exit 1
# Read default configuration
# shellcheck source=test/_include.sh
source ../_include.sh
# Test files user supplied files ($@) otherwise test everything
# shellcheck disable=SC2068
for file_path in ${@:-../scripts/*.sed ../parsing/*.sed}
do
output_file=$(basename "$file_path")
# Generate the debug file
test_message "Generating $output_file"
$sedsed --dump-debug -f "$file_path" |
# Remove sedsed version from footer comment
sed '$ s/\(generated by sedsed\)-[^ ]*/\1/' \
> "$output_file" || failed=1
done
tests_git_status
tests_exit
|