cmdlineTests: Allow tests with no input file

This commit is contained in:
Kamil Śliwak 2021-04-10 22:24:05 +02:00
parent cc65b426d0
commit 4e4f46cde5
3 changed files with 6 additions and 9 deletions

View File

@ -131,9 +131,11 @@ function test_solc_behaviour()
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
"$SOLC" "${filename}" "${solc_args[@]}" <"$solc_stdin" >"$stdout_path" 2>"$stderr_path"
"$SOLC" "${solc_args[@]}" <"$solc_stdin" >"$stdout_path" 2>"$stderr_path"
exitCode=$?
set -e
@ -300,11 +302,6 @@ printTask "Running general commandline tests..."
# Use printf to get rid of the trailing newline
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" ]
then
stdin="${inputFile}"

View File

@ -1 +1 @@
--standard-json
--standard-json input.sol

View File

@ -1 +1 @@
File not found: standard_file_not_found/input.sol
File not found: input.sol