diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-03-16 21:44:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-16 21:44:06 +0800 |
commit | 6d4cb24842b5955d921a8b6323b2c154ff0b83cb (patch) | |
tree | fb46fd013bb6b4aeeebcbd4e05493bb52fad1f7b | |
parent | e7e22c703c9fe2a6cd6cbd7c4683ecfc090c657b (diff) | |
parent | 5a939c4e1ac30e94892f4d4f2583443c38ca4113 (diff) | |
download | dexon-solidity-6d4cb24842b5955d921a8b6323b2c154ff0b83cb.tar.gz dexon-solidity-6d4cb24842b5955d921a8b6323b2c154ff0b83cb.tar.zst dexon-solidity-6d4cb24842b5955d921a8b6323b2c154ff0b83cb.zip |
Merge pull request #1779 from ethereum/moretests
Correctly find contracts with other delimiters.
-rwxr-xr-x | scripts/isolate_tests.py | 8 |
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 |