diff options
author | chriseth <chris@ethereum.org> | 2018-12-13 22:28:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-13 22:28:40 +0800 |
commit | ef95a1ab53c576dbbc2f7e73aef7584c210fecfa (patch) | |
tree | 26e79b13a8eb011712ec418bafbd9f42b6f681a5 /test | |
parent | b103c68fe115e61f9fd5a14fcc1a23ed588a71f9 (diff) | |
parent | d5a50d8aee007a2d1310ead9c9430c9eb14e9279 (diff) | |
download | dexon-solidity-ef95a1ab53c576dbbc2f7e73aef7584c210fecfa.tar.gz dexon-solidity-ef95a1ab53c576dbbc2f7e73aef7584c210fecfa.tar.zst dexon-solidity-ef95a1ab53c576dbbc2f7e73aef7584c210fecfa.zip |
Merge pull request #5651 from ethereum/cmdlineJsonTests
Remove pre-release warning from standard json cmdline tests.
Diffstat (limited to 'test')
-rwxr-xr-x | test/cmdlineTests.sh | 9 | ||||
-rw-r--r-- | test/cmdlineTests/standard.json.stdout | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh index 95176814..bb71e012 100755 --- a/test/cmdlineTests.sh +++ b/test/cmdlineTests.sh @@ -130,8 +130,13 @@ test_solc_behaviour() { exitCode=$? set -e - sed -i -e '/^Warning: This is a pre-release compiler version, please do not use it in production./d' "$stderr_path" - sed -i -e 's/ Consider adding "pragma .*$//' "$stderr_path" + if [[ "$solc_args" == *"--standard-json"* ]]; then + sed -i -e 's/{[^{]*Warning: This is a pre-release compiler version[^}]*},\{0,1\}//' "$stdout_path" + sed -i -e 's/,"errors":\[\]//' "$stdout_path" + else + sed -i -e '/^Warning: This is a pre-release compiler version, please do not use it in production./d' "$stderr_path" + sed -i -e 's/ Consider adding "pragma .*$//' "$stderr_path" + fi if [[ $exitCode -ne "$exit_code_expected" ]]; then printError "Incorrect exit code. Expected $exit_code_expected but got $exitCode." diff --git a/test/cmdlineTests/standard.json.stdout b/test/cmdlineTests/standard.json.stdout index ba4099e5..490e1f80 100644 --- a/test/cmdlineTests/standard.json.stdout +++ b/test/cmdlineTests/standard.json.stdout @@ -1 +1 @@ -{"contracts":{"A":{"C":{"evm":{}}}},"errors":[{"component":"general","formattedMessage":"Warning: This is a pre-release compiler version, please do not use it in production.\n","message":"This is a pre-release compiler version, please do not use it in production.","severity":"warning","type":"Warning"}],"sources":{"A":{"id":0}}} +{"contracts":{"A":{"C":{"evm":{}}}},"sources":{"A":{"id":0}}} |