mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Don't create empty expectation files when updating test expectations
This commit is contained in:
parent
525b4c70e7
commit
803901fa7e
@ -71,6 +71,15 @@ function update_expectation {
|
||||
local newExpectation="${1}"
|
||||
local expectationFile="${2}"
|
||||
|
||||
if [[ $newExpectation == "" || $newExpectation -eq 0 && $expectationFile == */exit ]]
|
||||
then
|
||||
if [[ -f $expectationFile ]]
|
||||
then
|
||||
rm "$expectationFile"
|
||||
fi
|
||||
return
|
||||
fi
|
||||
|
||||
echo "$newExpectation" > "$expectationFile"
|
||||
printLog "File $expectationFile updated to match the expectation."
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user