mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
cmdlineTests: Allow tests with no input file
This commit is contained in:
parent
cc65b426d0
commit
4e4f46cde5
@ -131,9 +131,11 @@ function test_solc_behaviour()
|
|||||||
|
|
||||||
if [[ "$exit_code_expected" = "" ]]; then exit_code_expected="0"; fi
|
if [[ "$exit_code_expected" = "" ]]; then exit_code_expected="0"; fi
|
||||||
|
|
||||||
local solc_command="$SOLC ${filename} ${solc_args[*]} <$solc_stdin"
|
[[ $filename == "" ]] || solc_args+=("$filename")
|
||||||
|
|
||||||
|
local solc_command="$SOLC ${solc_args[*]} <$solc_stdin"
|
||||||
set +e
|
set +e
|
||||||
"$SOLC" "${filename}" "${solc_args[@]}" <"$solc_stdin" >"$stdout_path" 2>"$stderr_path"
|
"$SOLC" "${solc_args[@]}" <"$solc_stdin" >"$stdout_path" 2>"$stderr_path"
|
||||||
exitCode=$?
|
exitCode=$?
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@ -300,11 +302,6 @@ printTask "Running general commandline tests..."
|
|||||||
# Use printf to get rid of the trailing newline
|
# Use printf to get rid of the trailing newline
|
||||||
inputFile=$(printf "%s" "${inputFiles}")
|
inputFile=$(printf "%s" "${inputFiles}")
|
||||||
|
|
||||||
# If no files specified, assume input.sol as the default
|
|
||||||
if [ -z "${inputFile}" ]; then
|
|
||||||
inputFile="${tdir}/input.sol"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${inputFile}" = "${tdir}/input.json" ]
|
if [ "${inputFile}" = "${tdir}/input.json" ]
|
||||||
then
|
then
|
||||||
stdin="${inputFile}"
|
stdin="${inputFile}"
|
||||||
|
@ -1 +1 @@
|
|||||||
--standard-json
|
--standard-json input.sol
|
||||||
|
@ -1 +1 @@
|
|||||||
File not found: standard_file_not_found/input.sol
|
File not found: input.sol
|
||||||
|
Loading…
Reference in New Issue
Block a user