solidity/test/cmdlineTests/~unknown_options/test.sh
Kamil Śliwak 6b061ba696 cmdlineTests: Extract script-based test out of cmdlineTests.sh
- Just extraction, with as few changes to the code as possible.
2023-06-02 16:10:40 +02:00

21 lines
429 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# shellcheck source=scripts/common.sh
source "${REPO_ROOT}/scripts/common.sh"
printTask "Testing unknown options..."
(
set +e
output=$("$SOLC" --allow=test 2>&1)
failed=$?
set -e
if [ "$output" == "unrecognised option '--allow=test'" ] && [ $failed -ne 0 ]
then
echo "Passed"
else
fail "Incorrect response to unknown options: $output"
fi
)