aboutsummaryrefslogtreecommitdiffstats
path: root/test/cmdlineTests.sh
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-03-01 00:42:14 +0800
committerGitHub <noreply@github.com>2018-03-01 00:42:14 +0800
commit9e3da89a7a0753e869b4668f9587385c9b37ba8d (patch)
tree0dbf9a21a2f3a7543dd78227600e44098235d41f /test/cmdlineTests.sh
parent7938339572d8f2f1ab4f9ef335076250f1f09b6c (diff)
parent5fd9ea4b2abf9d2498fa725cfdbdf152c3d3d15a (diff)
downloaddexon-solidity-9e3da89a7a0753e869b4668f9587385c9b37ba8d.tar
dexon-solidity-9e3da89a7a0753e869b4668f9587385c9b37ba8d.tar.gz
dexon-solidity-9e3da89a7a0753e869b4668f9587385c9b37ba8d.tar.bz2
dexon-solidity-9e3da89a7a0753e869b4668f9587385c9b37ba8d.tar.lz
dexon-solidity-9e3da89a7a0753e869b4668f9587385c9b37ba8d.tar.xz
dexon-solidity-9e3da89a7a0753e869b4668f9587385c9b37ba8d.tar.zst
dexon-solidity-9e3da89a7a0753e869b4668f9587385c9b37ba8d.zip
Merge pull request #3607 from izgzhen/complain-unknown-params
stop allow_guessing for command line option parser
Diffstat (limited to 'test/cmdlineTests.sh')
-rwxr-xr-xtest/cmdlineTests.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh
index 32456fd0..e86e0ad4 100755
--- a/test/cmdlineTests.sh
+++ b/test/cmdlineTests.sh
@@ -83,6 +83,21 @@ function compileWithoutWarning()
test -z "$output" -a "$failed" -eq 0
}
+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
+ printError "Incorrect response to unknown options: $STDERR"
+ exit 1
+ fi
+)
+
printTask "Compiling various other contracts and libraries..."
(
cd "$REPO_ROOT"/test/compilationTests/