aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-03-16 21:44:06 +0800
committerGitHub <noreply@github.com>2017-03-16 21:44:06 +0800
commit6d4cb24842b5955d921a8b6323b2c154ff0b83cb (patch)
treefb46fd013bb6b4aeeebcbd4e05493bb52fad1f7b /scripts
parente7e22c703c9fe2a6cd6cbd7c4683ecfc090c657b (diff)
parent5a939c4e1ac30e94892f4d4f2583443c38ca4113 (diff)
downloaddexon-solidity-6d4cb24842b5955d921a8b6323b2c154ff0b83cb.tar
dexon-solidity-6d4cb24842b5955d921a8b6323b2c154ff0b83cb.tar.gz
dexon-solidity-6d4cb24842b5955d921a8b6323b2c154ff0b83cb.tar.bz2
dexon-solidity-6d4cb24842b5955d921a8b6323b2c154ff0b83cb.tar.lz
dexon-solidity-6d4cb24842b5955d921a8b6323b2c154ff0b83cb.tar.xz
dexon-solidity-6d4cb24842b5955d921a8b6323b2c154ff0b83cb.tar.zst
dexon-solidity-6d4cb24842b5955d921a8b6323b2c154ff0b83cb.zip
Merge pull request #1779 from ethereum/moretests
Correctly find contracts with other delimiters.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/isolate_tests.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/isolate_tests.py b/scripts/isolate_tests.py
index 91900aa6..9bb52f4c 100755
--- a/scripts/isolate_tests.py
+++ b/scripts/isolate_tests.py
@@ -7,23 +7,27 @@
# scripts/isolate_tests.py test/libsolidity/*
import sys
+import re
def extract_cases(path):
lines = open(path).read().splitlines()
inside = False
+ delimiter = ''
tests = []
for l in lines:
if inside:
- if l.strip().endswith(')";'):
+ if l.strip().endswith(')' + delimiter + '";'):
inside = False
else:
tests[-1] += l + '\n'
else:
- if l.strip().endswith('R"('):
+ m = re.search(r'R"([^(]*)\($', l.strip())
+ if m:
inside = True
+ delimiter = m.group(1)
tests += ['']
return tests