diff options
author | chriseth <chris@ethereum.org> | 2018-10-09 04:58:58 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-10-09 19:48:25 +0800 |
commit | 7a6e23998a9c3bf449f5db18c9b854a404750189 (patch) | |
tree | 1c7ef88ffc8a50a28f80f550ed3638bd91bdbdae /test | |
parent | 15e4a5fc300741e5ee74717dd473aafb59bf0308 (diff) | |
download | dexon-solidity-7a6e23998a9c3bf449f5db18c9b854a404750189.tar.gz dexon-solidity-7a6e23998a9c3bf449f5db18c9b854a404750189.tar.zst dexon-solidity-7a6e23998a9c3bf449f5db18c9b854a404750189.zip |
Fix commandline tests for release version.
Diffstat (limited to 'test')
7 files changed, 4 insertions, 9 deletions
diff --git a/test/cmdlineErrorReports/too_long_line.sol.ref b/test/cmdlineErrorReports/too_long_line.sol.ref index 7cad93ee..55cd1935 100644 --- a/test/cmdlineErrorReports/too_long_line.sol.ref +++ b/test/cmdlineErrorReports/too_long_line.sol.ref @@ -1,4 +1,3 @@ - too_long_line.sol:1:1: Warning: Source file does not specify required compiler version! contract C { ^ (Relevant source part starts here and spans across multiple lines). diff --git a/test/cmdlineErrorReports/too_long_line_both_sides_short.sol.ref b/test/cmdlineErrorReports/too_long_line_both_sides_short.sol.ref index f2ea427a..9a5ebfba 100644 --- a/test/cmdlineErrorReports/too_long_line_both_sides_short.sol.ref +++ b/test/cmdlineErrorReports/too_long_line_both_sides_short.sol.ref @@ -1,4 +1,3 @@ - too_long_line_both_sides_short.sol:1:1: Warning: Source file does not specify required compiler version! contract C { ^ (Relevant source part starts here and spans across multiple lines). diff --git a/test/cmdlineErrorReports/too_long_line_edge_in.sol.ref b/test/cmdlineErrorReports/too_long_line_edge_in.sol.ref index b6699933..ad3b7805 100644 --- a/test/cmdlineErrorReports/too_long_line_edge_in.sol.ref +++ b/test/cmdlineErrorReports/too_long_line_edge_in.sol.ref @@ -1,4 +1,3 @@ - too_long_line_edge_in.sol:1:1: Warning: Source file does not specify required compiler version! contract C { ^ (Relevant source part starts here and spans across multiple lines). diff --git a/test/cmdlineErrorReports/too_long_line_edge_out.sol.ref b/test/cmdlineErrorReports/too_long_line_edge_out.sol.ref index 76df589a..d8495c11 100644 --- a/test/cmdlineErrorReports/too_long_line_edge_out.sol.ref +++ b/test/cmdlineErrorReports/too_long_line_edge_out.sol.ref @@ -1,4 +1,3 @@ - too_long_line_edge_out.sol:1:1: Warning: Source file does not specify required compiler version! contract C { ^ (Relevant source part starts here and spans across multiple lines). diff --git a/test/cmdlineErrorReports/too_long_line_left_short.sol.ref b/test/cmdlineErrorReports/too_long_line_left_short.sol.ref index efaa559d..00b6be5c 100644 --- a/test/cmdlineErrorReports/too_long_line_left_short.sol.ref +++ b/test/cmdlineErrorReports/too_long_line_left_short.sol.ref @@ -1,4 +1,3 @@ - too_long_line_left_short.sol:1:1: Warning: Source file does not specify required compiler version! contract C { ^ (Relevant source part starts here and spans across multiple lines). diff --git a/test/cmdlineErrorReports/too_long_line_right_short.sol.ref b/test/cmdlineErrorReports/too_long_line_right_short.sol.ref index 2b0c6d8c..88072d95 100644 --- a/test/cmdlineErrorReports/too_long_line_right_short.sol.ref +++ b/test/cmdlineErrorReports/too_long_line_right_short.sol.ref @@ -1,4 +1,3 @@ - too_long_line_right_short.sol:1:1: Warning: Source file does not specify required compiler version! contract C { ^ (Relevant source part starts here and spans across multiple lines). diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh index d7b95e8a..71866bce 100755 --- a/test/cmdlineTests.sh +++ b/test/cmdlineTests.sh @@ -123,7 +123,8 @@ test_solc_file_input_failures() { exitCode=$? set -e - stderr=`sed 's/.*This is a pre-release compiler version, please do not use it in production.*$//' $stderr_path` + 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 [[ $exitCode -eq 0 ]]; then printError "Incorrect exit code. Expected failure (non-zero) but got success (0)." @@ -141,12 +142,12 @@ test_solc_file_input_failures() { exit 1 fi - if [[ "$stderr" != "${stderr_expected}" ]]; then + if [[ "$(cat $stderr_path)" != "${stderr_expected}" ]]; then printError "Incorrect output on stderr received. Expected:" echo -e "${stderr_expected}" printError "But got:" - echo $stderr + cat $stderr_path rm -f $stdout_path $stderr_path exit 1 fi |