aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-12-13 20:31:12 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-12-13 21:42:29 +0800
commitd5a50d8aee007a2d1310ead9c9430c9eb14e9279 (patch)
treedc2c59bafd09bcf8e905fd0baafe656ecc61b18d /test
parent6e205cc4e32ccc55307a44ade4269448f6346924 (diff)
downloaddexon-solidity-d5a50d8aee007a2d1310ead9c9430c9eb14e9279.tar.gz
dexon-solidity-d5a50d8aee007a2d1310ead9c9430c9eb14e9279.tar.zst
dexon-solidity-d5a50d8aee007a2d1310ead9c9430c9eb14e9279.zip
Remove pre-release warning from standard json cmdline tests.
Diffstat (limited to 'test')
-rwxr-xr-xtest/cmdlineTests.sh9
-rw-r--r--test/cmdlineTests/standard.json.stdout2
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}}}