Skip to content

Commit

Permalink
Use globstar to locate TAP files in tests
Browse files Browse the repository at this point in the history
In preparation for adding a test suite for issue #2.
  • Loading branch information
pcolby committed Feb 11, 2024
1 parent d62bf54 commit 3af6e98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/usr/bin/env bash

set -o errexit -o noclobber -o nounset -o pipefail
shopt -s globstar inherit_errexit

: "${SOURCE_DIR:=${BASH_SOURCE[0]%/*}}"

failures=0
while IFS= read -d '' -r dirName; do
echo "Test case: ${dirName##*/}"
gawk -f "$SOURCE_DIR/../summary.gawk" --sandbox -- "$dirName"/*/{*.tap,test/unit/*.tap} >| "$dirName/observed.md"
gawk -f "$SOURCE_DIR/../summary.gawk" --sandbox -- "$dirName"/**/*.tap >| "$dirName/observed.md"
case "$OSTYPE" in
darwin*) extraDiffArgs='' ;; # macOS
msys*) extraDiffArgs='--color=auto --strip-trailing-cr' ;; # Windows
Expand Down

0 comments on commit 3af6e98

Please sign in to comment.