mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
cmdlineTests.sh: Fix the script failing to detect that --ast option does not exist
This commit is contained in:
parent
1f2ffa99c2
commit
ac12274acd
@ -436,15 +436,18 @@ SOLTMPDIR=$(mktemp -d)
|
|||||||
# The contract should be compiled
|
# The contract should be compiled
|
||||||
if [[ "$result" != 0 ]]
|
if [[ "$result" != 0 ]]
|
||||||
then
|
then
|
||||||
|
printError "Failed to compile a simple contract from standard input"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# This should not fail
|
# This should not fail
|
||||||
set +e
|
set +e
|
||||||
output=$(echo '' | "$SOLC" --ast - 2>/dev/null)
|
output=$(echo '' | "$SOLC" --ast-json - 2>/dev/null)
|
||||||
|
result=$?
|
||||||
set -e
|
set -e
|
||||||
if [[ $? != 0 ]]
|
if [[ $result != 0 ]]
|
||||||
then
|
then
|
||||||
|
printError "Incorrect response to --ast-json option with empty stdin"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user