mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
cmdlineTests.sh: Remove double slashes from input file paths
- `${tdir}` already ends with a slash so something like `${tdir}/input.json` evaluates to `test_dir//input.json`.
This commit is contained in:
parent
7f1389a6cd
commit
dfb5516446
@ -242,6 +242,9 @@ printTask "Running general commandline tests..."
|
||||
do
|
||||
printTask " - ${tdir}"
|
||||
|
||||
# Strip trailing slash from $tdir. `find` on MacOS X won't strip it and will produce double slashes.
|
||||
tdir=$(basename "${tdir}")
|
||||
|
||||
if [ -e "${tdir}/input.json" ]
|
||||
then
|
||||
inputFile=""
|
||||
@ -250,17 +253,17 @@ printTask "Running general commandline tests..."
|
||||
stdoutExpectationFile="${tdir}/output.json"
|
||||
args="--standard-json "$(cat ${tdir}/args 2>/dev/null || true)
|
||||
else
|
||||
if [[ -e "${tdir}input.yul" && -e "${tdir}input.sol" ]]
|
||||
if [[ -e "${tdir}/input.yul" && -e "${tdir}/input.sol" ]]
|
||||
then
|
||||
printError "Ambiguous input. Found both input.sol and input.yul."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -e "${tdir}input.yul" ]
|
||||
if [ -e "${tdir}/input.yul" ]
|
||||
then
|
||||
inputFile="${tdir}input.yul"
|
||||
inputFile="${tdir}/input.yul"
|
||||
else
|
||||
inputFile="${tdir}input.sol"
|
||||
inputFile="${tdir}/input.sol"
|
||||
fi
|
||||
stdin=""
|
||||
stdout="$(cat ${tdir}/output 2>/dev/null || true)"
|
||||
|
Loading…
Reference in New Issue
Block a user