updated tester
This commit is contained in:
parent
08c95294f6
commit
b011a5d94c
1 changed files with 6 additions and 20 deletions
|
|
@ -1,43 +1,29 @@
|
|||
#!/bin/bash
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
echo "=== LEXER TESTS ==="
|
||||
for test in lexer/*.in; do
|
||||
name=$(basename "$test" .in)
|
||||
echo "Testing lexer/$name..."
|
||||
|
||||
echo "Testing $test"
|
||||
if ! ../build/py2rb --dump-tokens --no-output --no-parsing < "$test" | diff - "lexer/${name}.out"; then
|
||||
echo "FAILED: lexer/$name"
|
||||
echo "FAILED: $test"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
echo "✓ All lexer tests passed"
|
||||
|
||||
echo ""
|
||||
echo "=== PARSER TESTS ==="
|
||||
for test in parser/*.in; do
|
||||
name=$(basename "$test" .in)
|
||||
echo "Testing parser/$name..."
|
||||
|
||||
echo "Testing $test"
|
||||
if ! ../build/py2rb --dump-ast --no-output < "$test" | diff - "parser/${name}.out"; then
|
||||
echo "FAILED: parser/$name"
|
||||
echo "FAILED: $test"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
echo "✓ All parser tests passed"
|
||||
|
||||
echo ""
|
||||
echo "=== Ruby output TESTS ==="
|
||||
for test in ruby/*.in; do
|
||||
name=$(basename "$test" .in)
|
||||
echo "Testing ruby output/$name..."
|
||||
|
||||
echo "Testing $test"
|
||||
if ! ../build/py2rb < "$test" | diff - "ruby/${name}.out"; then
|
||||
echo "FAILED: ruby output/$name"
|
||||
echo "FAILED: $test"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
echo "✓ All ruby output tests passed"
|
||||
. .
|
||||
echo ""
|
||||
echo "SUCCESS: All tests passed"
|
||||
Loading…
Add table
Add a link
Reference in a new issue