Skip to content

Commit

Permalink
diff between current and golden tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Nov 20, 2020
1 parent 886eb75 commit d6c0682
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
/forbidden-imports.toml
/result
/target
/tests/golden-results/*.current
7 changes: 6 additions & 1 deletion script/run-integration-tests.sh
Expand Up @@ -6,8 +6,13 @@ run_test() {
TEST_FILE="${1:-}"
NAME="$(basename "$TEST_FILE")"

GOLDEN="tests/golden-results/$NAME.txt"
CURRENT="$GOLDEN.current"

echo "===== $NAME"
env PATH="$(pwd)/target/debug:$PATH" bash -xeou pipefail "$TEST_FILE" > "tests/golden-results/$NAME.txt"
env PATH="$(pwd)/target/debug:$PATH" bash -xeou pipefail "$TEST_FILE" > "$CURRENT"

diff -U 0 "$GOLDEN" "$CURRENT"
}

cargo build
Expand Down

0 comments on commit d6c0682

Please sign in to comment.