aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorZhen Zhang <zhen@pineapple.exchange>2018-02-27 12:31:09 +0800
committerZhen Zhang <zhen@pineapple.exchange>2018-02-28 09:31:24 +0800
commit5fd9ea4b2abf9d2498fa725cfdbdf152c3d3d15a (patch)
tree4f8247dd853e53d3372e7475b59f854cd2a6167e /test
parent1f5eb4ba59891387c2dfcc10103c2f187bf2b4ee (diff)
downloaddexon-solidity-5fd9ea4b2abf9d2498fa725cfdbdf152c3d3d15a.tar.gz
dexon-solidity-5fd9ea4b2abf9d2498fa725cfdbdf152c3d3d15a.tar.zst
dexon-solidity-5fd9ea4b2abf9d2498fa725cfdbdf152c3d3d15a.zip
Stop allow_guessing for command line option parser
Diffstat (limited to 'test')
-rwxr-xr-xtest/cmdlineTests.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh
index a249b601..f2c1f2c3 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/