Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make command line tests to be able to run on unreleased version #11166

Merged
merged 2 commits into from
Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/types/reference-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ If you want to use string parameters or other types, you need to convert them to
::

// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.8.3;
pragma solidity ^0.8.4;

contract C {
bytes s = "Storage";
Expand Down
5 changes: 5 additions & 0 deletions test/cmdlineTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ SOLTMPDIR=$(mktemp -d)
set -e
cd "$SOLTMPDIR"
"$REPO_ROOT"/scripts/isolate_tests.py "$REPO_ROOT"/docs/ docs
developmentVersion=$("$REPO_ROOT/scripts/get_version.sh")

for f in *.sol
do
Expand All @@ -378,6 +379,10 @@ SOLTMPDIR=$(mktemp -d)
then
opts+=(-o)
fi

# Disable the version pragma in code snippets that only work with the current development version.
# It's necessary because x.y.z won't match `^x.y.z` or `>=x.y.z` pragmas until it's officially released.
sed -i.bak -E -e 's/pragma[[:space:]]+solidity[[:space:]]*(\^|>=)[[:space:]]*'"$developmentVersion"'/pragma solidity >0.0.1/' "$f"
mijovic marked this conversation as resolved.
Show resolved Hide resolved
compileFull "${opts[@]}" "$SOLTMPDIR/$f"
done
)
Expand Down