mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11839 from priyansh786/develop
Don't create empty expectation files when updating test expectations
This commit is contained in:
commit
5e5f49df93
@ -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