Skip to content

Commit

Permalink
[test] test tula executable directly
Browse files Browse the repository at this point in the history
  • Loading branch information
rexim committed May 28, 2024
1 parent c36df0e commit abeed02
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions record.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

set -xe

cargo build

for row in $(cat tests.list); do
file=$(echo $row | cut -d, -f1)
kind=$(echo $row | cut -d, -f2)
case $kind in
"run")
expect="$file.expect"
cargo run -q run $file > $expect 2>&1 || true
./target/debug/tula run $file > $expect 2>&1 || true
;;
"expand")
expect="$file.expect.expand"
cargo run -q expand $file > $expect
./target/debug/tula expand $file > $expect
;;
"ignore")
echo "$file is explicitly ignored"
Expand Down
6 changes: 4 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

set -xe

cargo build

for row in $(cat tests.list); do
file=$(echo $row | cut -d, -f1)
kind=$(echo $row | cut -d, -f2)
actual=$(mktemp)
case $kind in
"run")
cargo run -q run $file > "$actual" 2>&1 || true
./target/debug/tula run $file > "$actual" 2>&1 || true
diff -u "$file.expect" "$actual"
;;
"expand")
cargo run -q expand $file > "$actual"
./target/debug/tula expand $file > "$actual"
diff -u "$file.expect.expand" "$actual"
;;
"ignore")
Expand Down

0 comments on commit abeed02

Please sign in to comment.