-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ECMA definition of symmetry operation regexp and associated tests
- Loading branch information
Showing
5 changed files
with
3,935 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#! /bin/sh | ||
|
||
# Test case: test if a provided PCRE correctly recognises symmetry | ||
# operation strings. | ||
|
||
#BEGIN DEPEND | ||
|
||
INPUT_GRAMMAR=tests/generated/symops.ecma | ||
|
||
#END DEPEND | ||
|
||
|
||
/usr/bin/env python << EOF | ||
import re | ||
import sys | ||
with open("${INPUT_GRAMMAR}") as f: | ||
expression = [line.strip() for line in f.readlines() if line.strip() and not line.strip().startswith("#")][0] | ||
with open("tests/inputs/symops.lst") as cases: | ||
for case in cases: | ||
if re.match(expression, case): | ||
print(case, end="") | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.