cmdlineTests.sh: Fix test_solc_assembly_output including garbage in the tested output

This commit is contained in:
Kamil Śliwak 2020-12-12 05:40:20 +01:00
parent db9aa36d6c
commit 1f2ffa99c2

View File

@ -206,7 +206,7 @@ function test_solc_assembly_output()
local expected_object="object \"object\" { code "${expected}" }" local expected_object="object \"object\" { code "${expected}" }"
output=$(echo "${input}" | "$SOLC" - ${solc_args} 2>/dev/null) output=$(echo "${input}" | "$SOLC" - ${solc_args} 2>/dev/null)
empty=$(echo $output | sed -ne '/'"${expected_object}"'/p') empty=$(echo "$output" | tr '\n' ' ' | tr -s ' ' | sed -ne "/${expected_object}/p")
if [ -z "$empty" ] if [ -z "$empty" ]
then then
printError "Incorrect assembly output. Expected: " printError "Incorrect assembly output. Expected: "