From abeed02f4f02e8f281fae2ca3e2d8f6f3a2e8ab9 Mon Sep 17 00:00:00 2001 From: rexim Date: Tue, 28 May 2024 10:48:51 +0700 Subject: [PATCH] [test] test tula executable directly --- record.sh | 6 ++++-- test.sh | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/record.sh b/record.sh index 1a60f49..ea490fc 100755 --- a/record.sh +++ b/record.sh @@ -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" diff --git a/test.sh b/test.sh index d690cec..cfa1993 100755 --- a/test.sh +++ b/test.sh @@ -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")