From 0d1b9c3b1bbfcc4ca61d35049f1c3624681dbb13 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Wed, 21 Nov 2018 18:10:56 +0100 Subject: Adds tests for --optimize in assembly mode. --- test/cmdlineTests.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'test/cmdlineTests.sh') diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh index 4838d088..9dfbe409 100755 --- a/test/cmdlineTests.sh +++ b/test/cmdlineTests.sh @@ -262,10 +262,19 @@ SOLTMPDIR=$(mktemp -d) ) rm -rf "$SOLTMPDIR" -printTask "Testing assemble, yul, strict-assembly..." -echo '{}' | "$SOLC" - --assemble &>/dev/null -echo '{}' | "$SOLC" - --yul &>/dev/null -echo '{}' | "$SOLC" - --strict-assembly &>/dev/null +printTask "Testing assemble, yul, strict-assembly and optimize..." +( + echo '{}' | "$SOLC" - --assemble &>/dev/null + echo '{}' | "$SOLC" - --yul &>/dev/null + echo '{}' | "$SOLC" - --strict-assembly &>/dev/null + + # Test options above in conjunction with --optimize. + # Using both, --assemble and --optimize should fail. + ! echo '{}' | "$SOLC" - --assemble --optimize &>/dev/null + echo '{}' | "$SOLC" - --yul --optimize &>/dev/null + echo '{}' | "$SOLC" - --strict-assembly --optimize &>/dev/null +) + printTask "Testing standard input..." SOLTMPDIR=$(mktemp -d) -- cgit