mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-06 12:39:57 +00:00
Merge stdout/stderr in the same output
In this way we can print() lines from Lua + debug use TRACE() lines from code to test/debug.
This commit is contained in:
parent
8adc0b8832
commit
e08f4f5827
10
run-tests.sh
10
run-tests.sh
@ -46,7 +46,7 @@ if [[ "$filter" == "" ]] || [[ "console" =~ $filter ]]; then
|
|||||||
echo ----------------------------------------------------------------------
|
echo ----------------------------------------------------------------------
|
||||||
echo "Testing console..."
|
echo "Testing console..."
|
||||||
|
|
||||||
$ASEPRITE -b --script scripts/console_assert.lua >$t/tmp 2>$t/tmp_err
|
$ASEPRITE -b --script scripts/console_assert.lua >$t/tmp 2>&1
|
||||||
! grep -q "this should be in the output" $t/tmp && fail "print() text not found in output"
|
! grep -q "this should be in the output" $t/tmp && fail "print() text not found in output"
|
||||||
! grep -q "assertion failed" $t/tmp && fail "assert() text not found in output"
|
! grep -q "assertion failed" $t/tmp && fail "assert() text not found in output"
|
||||||
grep -q "this should not be in the output" $t/tmp && fail "text that shouldn't be in the output is"
|
grep -q "this should not be in the output" $t/tmp && fail "text that shouldn't be in the output is"
|
||||||
@ -54,7 +54,7 @@ if [[ "$filter" == "" ]] || [[ "console" =~ $filter ]]; then
|
|||||||
if [[ "$(uname)" =~ "MINGW32" ]] || [[ "$(uname)" =~ "MSYS_NT-10.0" ]] ; then
|
if [[ "$(uname)" =~ "MINGW32" ]] || [[ "$(uname)" =~ "MSYS_NT-10.0" ]] ; then
|
||||||
echo Ignore console tests on Windows
|
echo Ignore console tests on Windows
|
||||||
else
|
else
|
||||||
$ASEPRITE -b --script scripts/console_print.lua >$t/tmp 2>$t/tmp_err
|
$ASEPRITE -b --script scripts/console_print.lua >$t/tmp 2>&1
|
||||||
cat >$t/tmp_expected <<EOF
|
cat >$t/tmp_expected <<EOF
|
||||||
hello world
|
hello world
|
||||||
1 2 3
|
1 2 3
|
||||||
@ -76,10 +76,8 @@ for script in scripts/*.lua ; do
|
|||||||
first=1
|
first=1
|
||||||
fi
|
fi
|
||||||
echo "Running $script"
|
echo "Running $script"
|
||||||
if ! $ASEPRITE -b --script $script >$t/tmp 2>$t/tmp_err ; then
|
if ! $ASEPRITE -b --script $script >$t/tmp 2>&1 ; then
|
||||||
echo FAILED
|
echo FAILED && cat $t/tmp
|
||||||
echo STDOUT && cat $t/tmp
|
|
||||||
echo STDERR && cat $t/tmp_err
|
|
||||||
result=1
|
result=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user