chore(tests/*/test.sh): change working dir; avoid using ls in for-loop
This commit is contained in:
parent
dc92f67588
commit
e41573afc4
2 changed files with 4 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
cd "$(dirname "$0")"
|
||||
if [ $# -ne 2 -a $# -ne 1 ]; then
|
||||
echo "Usage: test.sh [lean-executable-path] [yes/no]?"
|
||||
exit 1
|
||||
|
@ -12,7 +13,7 @@ else
|
|||
INTERACTIVE=$2
|
||||
fi
|
||||
NUM_ERRORS=0
|
||||
for f in `ls *.lean`; do
|
||||
for f in *.lean; do
|
||||
echo "-- testing $f"
|
||||
$LEAN -t config.lean $f &> $f.produced.out
|
||||
if test -f $f.expected.out; then
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
cd "$(dirname "$0")"
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: test.sh [lean-executable-path]"
|
||||
exit 1
|
||||
|
@ -6,7 +7,7 @@ fi
|
|||
ulimit -s unlimited
|
||||
LEAN=$1
|
||||
NUM_ERRORS=0
|
||||
for f in `ls *.lua`; do
|
||||
for f in *.lua; do
|
||||
echo "-- testing $f"
|
||||
if $LEAN extra.lua $f > $f.produced.out; then
|
||||
echo "-- worked"
|
||||
|
|
Loading…
Add table
Reference in a new issue