Skip to content

Commit cf1b9a5

Browse files
authored
Merge pull request #13109 from sourabhxyz/develop
Fix commandline tests not detecting a snippet with a broken free function definition
2 parents ef2aa59 + 8e67b28 commit cf1b9a5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/contracts/using-for.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ instead of library functions.
8787
}
8888
8989
function contains(Data storage self, uint value)
90-
public
9190
view
9291
returns (bool)
9392
{

test/cmdlineTests.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,15 +517,16 @@ SOLTMPDIR=$(mktemp -d)
517517
opts=()
518518
# We expect errors if explicitly stated, or if imports
519519
# are used (in the style guide)
520-
if grep -E "This will not compile|import \"" "$f" >/dev/null
520+
if grep -E "// This will not compile" "$f" >/dev/null ||
521+
sed -e 's|//.*||g' "$f" | grep -E "import \"" >/dev/null
521522
then
522523
opts=(--expect-errors)
523524
fi
524-
if grep "This will report a warning" "$f" >/dev/null
525+
if grep "// This will report a warning" "$f" >/dev/null
525526
then
526527
opts+=(--expect-warnings)
527528
fi
528-
if grep "This may report a warning" "$f" >/dev/null
529+
if grep "// This may report a warning" "$f" >/dev/null
529530
then
530531
opts+=(--ignore-warnings)
531532
fi

0 commit comments

Comments
 (0)