From d67b2323435c13384900b20b43e9625c684be0ac Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 6 Dec 2018 12:31:27 +0100 Subject: Extend capabilities of the generic commandline test. --- test/cmdlineErrorReports/too_long_line.sol | 4 --- test/cmdlineErrorReports/too_long_line.sol.ref | 6 ---- .../too_long_line_both_sides_short.sol | 5 ---- .../too_long_line_both_sides_short.sol.ref | 6 ---- test/cmdlineErrorReports/too_long_line_edge_in.sol | 4 --- .../too_long_line_edge_in.sol.ref | 6 ---- .../cmdlineErrorReports/too_long_line_edge_out.sol | 4 --- .../too_long_line_edge_out.sol.ref | 6 ---- .../too_long_line_left_short.sol | 4 --- .../too_long_line_left_short.sol.ref | 6 ---- .../too_long_line_right_short.sol | 5 ---- .../too_long_line_right_short.sol.ref | 6 ---- test/cmdlineTests.sh | 32 +++++++++++++--------- test/cmdlineTests/too_long_line.sol | 4 +++ test/cmdlineTests/too_long_line.sol.err | 6 ++++ test/cmdlineTests/too_long_line.sol.exit | 1 + .../too_long_line_both_sides_short.sol | 5 ++++ .../too_long_line_both_sides_short.sol.err | 6 ++++ .../too_long_line_both_sides_short.sol.exit | 1 + test/cmdlineTests/too_long_line_edge_in.sol | 4 +++ test/cmdlineTests/too_long_line_edge_in.sol.err | 6 ++++ test/cmdlineTests/too_long_line_edge_in.sol.exit | 1 + test/cmdlineTests/too_long_line_edge_out.sol | 4 +++ test/cmdlineTests/too_long_line_edge_out.sol.err | 6 ++++ test/cmdlineTests/too_long_line_edge_out.sol.exit | 1 + test/cmdlineTests/too_long_line_left_short.sol | 4 +++ test/cmdlineTests/too_long_line_left_short.sol.err | 6 ++++ .../cmdlineTests/too_long_line_left_short.sol.exit | 1 + test/cmdlineTests/too_long_line_right_short.sol | 5 ++++ .../cmdlineTests/too_long_line_right_short.sol.err | 6 ++++ .../too_long_line_right_short.sol.exit | 1 + 31 files changed, 87 insertions(+), 75 deletions(-) delete mode 100644 test/cmdlineErrorReports/too_long_line.sol delete mode 100644 test/cmdlineErrorReports/too_long_line.sol.ref delete mode 100644 test/cmdlineErrorReports/too_long_line_both_sides_short.sol delete mode 100644 test/cmdlineErrorReports/too_long_line_both_sides_short.sol.ref delete mode 100644 test/cmdlineErrorReports/too_long_line_edge_in.sol delete mode 100644 test/cmdlineErrorReports/too_long_line_edge_in.sol.ref delete mode 100644 test/cmdlineErrorReports/too_long_line_edge_out.sol delete mode 100644 test/cmdlineErrorReports/too_long_line_edge_out.sol.ref delete mode 100644 test/cmdlineErrorReports/too_long_line_left_short.sol delete mode 100644 test/cmdlineErrorReports/too_long_line_left_short.sol.ref delete mode 100644 test/cmdlineErrorReports/too_long_line_right_short.sol delete mode 100644 test/cmdlineErrorReports/too_long_line_right_short.sol.ref create mode 100644 test/cmdlineTests/too_long_line.sol create mode 100644 test/cmdlineTests/too_long_line.sol.err create mode 100644 test/cmdlineTests/too_long_line.sol.exit create mode 100644 test/cmdlineTests/too_long_line_both_sides_short.sol create mode 100644 test/cmdlineTests/too_long_line_both_sides_short.sol.err create mode 100644 test/cmdlineTests/too_long_line_both_sides_short.sol.exit create mode 100644 test/cmdlineTests/too_long_line_edge_in.sol create mode 100644 test/cmdlineTests/too_long_line_edge_in.sol.err create mode 100644 test/cmdlineTests/too_long_line_edge_in.sol.exit create mode 100644 test/cmdlineTests/too_long_line_edge_out.sol create mode 100644 test/cmdlineTests/too_long_line_edge_out.sol.err create mode 100644 test/cmdlineTests/too_long_line_edge_out.sol.exit create mode 100644 test/cmdlineTests/too_long_line_left_short.sol create mode 100644 test/cmdlineTests/too_long_line_left_short.sol.err create mode 100644 test/cmdlineTests/too_long_line_left_short.sol.exit create mode 100644 test/cmdlineTests/too_long_line_right_short.sol create mode 100644 test/cmdlineTests/too_long_line_right_short.sol.err create mode 100644 test/cmdlineTests/too_long_line_right_short.sol.exit (limited to 'test') diff --git a/test/cmdlineErrorReports/too_long_line.sol b/test/cmdlineErrorReports/too_long_line.sol deleted file mode 100644 index 7df1057a..00000000 --- a/test/cmdlineErrorReports/too_long_line.sol +++ /dev/null @@ -1,4 +0,0 @@ -contract C { - function ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff(announcementType Type, string Announcement, string Link, bool Oppositable, string _str, uint256 _uint, address _addr) onlyOwner external { -} -} diff --git a/test/cmdlineErrorReports/too_long_line.sol.ref b/test/cmdlineErrorReports/too_long_line.sol.ref deleted file mode 100644 index 55cd1935..00000000 --- a/test/cmdlineErrorReports/too_long_line.sol.ref +++ /dev/null @@ -1,6 +0,0 @@ -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). -too_long_line.sol:2:164: Error: Identifier not found or not unique. - ... ffffffffffffffffffffffffffffffffff(announcementType Type, string Announcement, string ... - ^--------------^ diff --git a/test/cmdlineErrorReports/too_long_line_both_sides_short.sol b/test/cmdlineErrorReports/too_long_line_both_sides_short.sol deleted file mode 100644 index 062f0292..00000000 --- a/test/cmdlineErrorReports/too_long_line_both_sides_short.sol +++ /dev/null @@ -1,5 +0,0 @@ -contract C { - function f(announcementTypeXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Type, - string Announcement, string Link, bool Oppositable, string _str, uint256 _uint, address _addr) onlyOwner external { -} -} diff --git a/test/cmdlineErrorReports/too_long_line_both_sides_short.sol.ref b/test/cmdlineErrorReports/too_long_line_both_sides_short.sol.ref deleted file mode 100644 index 9a5ebfba..00000000 --- a/test/cmdlineErrorReports/too_long_line_both_sides_short.sol.ref +++ /dev/null @@ -1,6 +0,0 @@ -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). -too_long_line_both_sides_short.sol:2:15: Error: Identifier not found or not unique. - function f(announcementTypeXXXXXXXXXXXXXXXXXXX ... XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Type, - ^-------------------------------------------------------------------------^ diff --git a/test/cmdlineErrorReports/too_long_line_edge_in.sol b/test/cmdlineErrorReports/too_long_line_edge_in.sol deleted file mode 100644 index 6f181c83..00000000 --- a/test/cmdlineErrorReports/too_long_line_edge_in.sol +++ /dev/null @@ -1,4 +0,0 @@ -contract C { - function ffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Ty, string A) onlyOwner external { -} -} diff --git a/test/cmdlineErrorReports/too_long_line_edge_in.sol.ref b/test/cmdlineErrorReports/too_long_line_edge_in.sol.ref deleted file mode 100644 index ad3b7805..00000000 --- a/test/cmdlineErrorReports/too_long_line_edge_in.sol.ref +++ /dev/null @@ -1,6 +0,0 @@ -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). -too_long_line_edge_in.sol:2:36: Error: Identifier not found or not unique. - function ffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Ty, string A) onlyOwner external { - ^----------------------------------------------------------------------------------------------^ diff --git a/test/cmdlineErrorReports/too_long_line_edge_out.sol b/test/cmdlineErrorReports/too_long_line_edge_out.sol deleted file mode 100644 index 29d3cee6..00000000 --- a/test/cmdlineErrorReports/too_long_line_edge_out.sol +++ /dev/null @@ -1,4 +0,0 @@ -contract C { - function fffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Typ, string A) onlyOwner external { -} -} diff --git a/test/cmdlineErrorReports/too_long_line_edge_out.sol.ref b/test/cmdlineErrorReports/too_long_line_edge_out.sol.ref deleted file mode 100644 index d8495c11..00000000 --- a/test/cmdlineErrorReports/too_long_line_edge_out.sol.ref +++ /dev/null @@ -1,6 +0,0 @@ -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). -too_long_line_edge_out.sol:2:37: Error: Identifier not found or not unique. - ... function fffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Typ, string A) onlyOwner external ... - ^----------------------------------------------------------------------------------------------^ diff --git a/test/cmdlineErrorReports/too_long_line_left_short.sol b/test/cmdlineErrorReports/too_long_line_left_short.sol deleted file mode 100644 index 2accfcce..00000000 --- a/test/cmdlineErrorReports/too_long_line_left_short.sol +++ /dev/null @@ -1,4 +0,0 @@ -contract C { - function f(announcementType Type, string Announcement, string Link, bool Oppositable, string _str, uint256 _uint, address _addr) onlyOwner external { -} -} diff --git a/test/cmdlineErrorReports/too_long_line_left_short.sol.ref b/test/cmdlineErrorReports/too_long_line_left_short.sol.ref deleted file mode 100644 index 00b6be5c..00000000 --- a/test/cmdlineErrorReports/too_long_line_left_short.sol.ref +++ /dev/null @@ -1,6 +0,0 @@ -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). -too_long_line_left_short.sol:2:15: Error: Identifier not found or not unique. - function f(announcementType Type, string Announcement, string ... - ^--------------^ diff --git a/test/cmdlineErrorReports/too_long_line_right_short.sol b/test/cmdlineErrorReports/too_long_line_right_short.sol deleted file mode 100644 index 936b3961..00000000 --- a/test/cmdlineErrorReports/too_long_line_right_short.sol +++ /dev/null @@ -1,5 +0,0 @@ -contract C { - function ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff(announcementType Type, - string Announcement, string Link, bool Oppositable, string _str, uint256 _uint, address _addr) onlyOwner external { -} -} diff --git a/test/cmdlineErrorReports/too_long_line_right_short.sol.ref b/test/cmdlineErrorReports/too_long_line_right_short.sol.ref deleted file mode 100644 index 88072d95..00000000 --- a/test/cmdlineErrorReports/too_long_line_right_short.sol.ref +++ /dev/null @@ -1,6 +0,0 @@ -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). -too_long_line_right_short.sol:2:164: Error: Identifier not found or not unique. - ... ffffffffffffffffffffffffffffffffff(announcementType Type, - ^--------------^ diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh index fdc9fbe3..7b2b528b 100755 --- a/test/cmdlineTests.sh +++ b/test/cmdlineTests.sh @@ -110,13 +110,15 @@ printTask "Testing unknown options..." # General helper function for testing SOLC behaviour, based on file name, compile opts, exit code, stdout and stderr. # An failure is expected. -test_solc_file_input_failures() { +test_solc_behaviour() { local filename="${1}" local solc_args="${2}" local stdout_expected="${3}" - local stderr_expected="${4}" + local exit_code_expected="${4}" + local stderr_expected="${5}" local stdout_path=`mktemp` local stderr_path=`mktemp` + if [[ "$exit_code_expected" = "" ]]; then exit_code_expected="0"; fi set +e "$SOLC" "${filename}" ${solc_args} 1>$stdout_path 2>$stderr_path @@ -126,14 +128,14 @@ test_solc_file_input_failures() { 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)." + if [[ $exitCode -ne "$exit_code_expected" ]]; then + printError "Incorrect exit code. Expected $exit_code_expected but got $exitCode." rm -f $stdout_path $stderr_path exit 1 fi if [[ "$(cat $stdout_path)" != "${stdout_expected}" ]]; then - printError "Incorrect output on stderr received. Expected:" + printError "Incorrect output on stdout received. Expected:" echo -e "${stdout_expected}" printError "But got:" @@ -156,22 +158,26 @@ test_solc_file_input_failures() { } printTask "Testing passing files that are not found..." -test_solc_file_input_failures "file_not_found.sol" "" "" "\"file_not_found.sol\" is not found." +test_solc_behaviour "file_not_found.sol" "" "" 1 "\"file_not_found.sol\" is not found." printTask "Testing passing files that are not files..." -test_solc_file_input_failures "." "" "" "\".\" is not a valid file." +test_solc_behaviour "." "" "" 1 "\".\" is not a valid file." printTask "Testing passing empty remappings..." -test_solc_file_input_failures "${0}" "=/some/remapping/target" "" "Invalid remapping: \"=/some/remapping/target\"." -test_solc_file_input_failures "${0}" "ctx:=/some/remapping/target" "" "Invalid remapping: \"ctx:=/some/remapping/target\"." +test_solc_behaviour "${0}" "=/some/remapping/target" "" 1 "Invalid remapping: \"=/some/remapping/target\"." +test_solc_behaviour "${0}" "ctx:=/some/remapping/target" "" 1 "Invalid remapping: \"ctx:=/some/remapping/target\"." -printTask "Testing passing location printing..." +printTask "Running general commandline tests..." ( -cd "$REPO_ROOT"/test/cmdlineErrorReports/ +cd "$REPO_ROOT"/test/cmdlineTests/ for file in *.sol do - ret=`cat $file.ref` - test_solc_file_input_failures "$file" "" "" "$ret" + args=$(cat $file.args 2>/dev/null || true) + stdout=$(cat $file.stdout 2>/dev/null || true) + exitCode=$(cat $file.exit 2>/dev/null || true) + err=$(cat $file.err 2>/dev/null || true) + printTask " - $file" + test_solc_behaviour "$file" "$args" "$stdout" "$exitCode" "$err" done ) diff --git a/test/cmdlineTests/too_long_line.sol b/test/cmdlineTests/too_long_line.sol new file mode 100644 index 00000000..7df1057a --- /dev/null +++ b/test/cmdlineTests/too_long_line.sol @@ -0,0 +1,4 @@ +contract C { + function ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff(announcementType Type, string Announcement, string Link, bool Oppositable, string _str, uint256 _uint, address _addr) onlyOwner external { +} +} diff --git a/test/cmdlineTests/too_long_line.sol.err b/test/cmdlineTests/too_long_line.sol.err new file mode 100644 index 00000000..55cd1935 --- /dev/null +++ b/test/cmdlineTests/too_long_line.sol.err @@ -0,0 +1,6 @@ +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). +too_long_line.sol:2:164: Error: Identifier not found or not unique. + ... ffffffffffffffffffffffffffffffffff(announcementType Type, string Announcement, string ... + ^--------------^ diff --git a/test/cmdlineTests/too_long_line.sol.exit b/test/cmdlineTests/too_long_line.sol.exit new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/test/cmdlineTests/too_long_line.sol.exit @@ -0,0 +1 @@ +1 diff --git a/test/cmdlineTests/too_long_line_both_sides_short.sol b/test/cmdlineTests/too_long_line_both_sides_short.sol new file mode 100644 index 00000000..062f0292 --- /dev/null +++ b/test/cmdlineTests/too_long_line_both_sides_short.sol @@ -0,0 +1,5 @@ +contract C { + function f(announcementTypeXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Type, + string Announcement, string Link, bool Oppositable, string _str, uint256 _uint, address _addr) onlyOwner external { +} +} diff --git a/test/cmdlineTests/too_long_line_both_sides_short.sol.err b/test/cmdlineTests/too_long_line_both_sides_short.sol.err new file mode 100644 index 00000000..9a5ebfba --- /dev/null +++ b/test/cmdlineTests/too_long_line_both_sides_short.sol.err @@ -0,0 +1,6 @@ +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). +too_long_line_both_sides_short.sol:2:15: Error: Identifier not found or not unique. + function f(announcementTypeXXXXXXXXXXXXXXXXXXX ... XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Type, + ^-------------------------------------------------------------------------^ diff --git a/test/cmdlineTests/too_long_line_both_sides_short.sol.exit b/test/cmdlineTests/too_long_line_both_sides_short.sol.exit new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/test/cmdlineTests/too_long_line_both_sides_short.sol.exit @@ -0,0 +1 @@ +1 diff --git a/test/cmdlineTests/too_long_line_edge_in.sol b/test/cmdlineTests/too_long_line_edge_in.sol new file mode 100644 index 00000000..6f181c83 --- /dev/null +++ b/test/cmdlineTests/too_long_line_edge_in.sol @@ -0,0 +1,4 @@ +contract C { + function ffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Ty, string A) onlyOwner external { +} +} diff --git a/test/cmdlineTests/too_long_line_edge_in.sol.err b/test/cmdlineTests/too_long_line_edge_in.sol.err new file mode 100644 index 00000000..ad3b7805 --- /dev/null +++ b/test/cmdlineTests/too_long_line_edge_in.sol.err @@ -0,0 +1,6 @@ +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). +too_long_line_edge_in.sol:2:36: Error: Identifier not found or not unique. + function ffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Ty, string A) onlyOwner external { + ^----------------------------------------------------------------------------------------------^ diff --git a/test/cmdlineTests/too_long_line_edge_in.sol.exit b/test/cmdlineTests/too_long_line_edge_in.sol.exit new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/test/cmdlineTests/too_long_line_edge_in.sol.exit @@ -0,0 +1 @@ +1 diff --git a/test/cmdlineTests/too_long_line_edge_out.sol b/test/cmdlineTests/too_long_line_edge_out.sol new file mode 100644 index 00000000..29d3cee6 --- /dev/null +++ b/test/cmdlineTests/too_long_line_edge_out.sol @@ -0,0 +1,4 @@ +contract C { + function fffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Typ, string A) onlyOwner external { +} +} diff --git a/test/cmdlineTests/too_long_line_edge_out.sol.err b/test/cmdlineTests/too_long_line_edge_out.sol.err new file mode 100644 index 00000000..d8495c11 --- /dev/null +++ b/test/cmdlineTests/too_long_line_edge_out.sol.err @@ -0,0 +1,6 @@ +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). +too_long_line_edge_out.sol:2:37: Error: Identifier not found or not unique. + ... function fffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Typ, string A) onlyOwner external ... + ^----------------------------------------------------------------------------------------------^ diff --git a/test/cmdlineTests/too_long_line_edge_out.sol.exit b/test/cmdlineTests/too_long_line_edge_out.sol.exit new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/test/cmdlineTests/too_long_line_edge_out.sol.exit @@ -0,0 +1 @@ +1 diff --git a/test/cmdlineTests/too_long_line_left_short.sol b/test/cmdlineTests/too_long_line_left_short.sol new file mode 100644 index 00000000..2accfcce --- /dev/null +++ b/test/cmdlineTests/too_long_line_left_short.sol @@ -0,0 +1,4 @@ +contract C { + function f(announcementType Type, string Announcement, string Link, bool Oppositable, string _str, uint256 _uint, address _addr) onlyOwner external { +} +} diff --git a/test/cmdlineTests/too_long_line_left_short.sol.err b/test/cmdlineTests/too_long_line_left_short.sol.err new file mode 100644 index 00000000..00b6be5c --- /dev/null +++ b/test/cmdlineTests/too_long_line_left_short.sol.err @@ -0,0 +1,6 @@ +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). +too_long_line_left_short.sol:2:15: Error: Identifier not found or not unique. + function f(announcementType Type, string Announcement, string ... + ^--------------^ diff --git a/test/cmdlineTests/too_long_line_left_short.sol.exit b/test/cmdlineTests/too_long_line_left_short.sol.exit new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/test/cmdlineTests/too_long_line_left_short.sol.exit @@ -0,0 +1 @@ +1 diff --git a/test/cmdlineTests/too_long_line_right_short.sol b/test/cmdlineTests/too_long_line_right_short.sol new file mode 100644 index 00000000..936b3961 --- /dev/null +++ b/test/cmdlineTests/too_long_line_right_short.sol @@ -0,0 +1,5 @@ +contract C { + function ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff(announcementType Type, + string Announcement, string Link, bool Oppositable, string _str, uint256 _uint, address _addr) onlyOwner external { +} +} diff --git a/test/cmdlineTests/too_long_line_right_short.sol.err b/test/cmdlineTests/too_long_line_right_short.sol.err new file mode 100644 index 00000000..88072d95 --- /dev/null +++ b/test/cmdlineTests/too_long_line_right_short.sol.err @@ -0,0 +1,6 @@ +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). +too_long_line_right_short.sol:2:164: Error: Identifier not found or not unique. + ... ffffffffffffffffffffffffffffffffff(announcementType Type, + ^--------------^ diff --git a/test/cmdlineTests/too_long_line_right_short.sol.exit b/test/cmdlineTests/too_long_line_right_short.sol.exit new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/test/cmdlineTests/too_long_line_right_short.sol.exit @@ -0,0 +1 @@ +1 -- cgit v1.2.3