You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
1 year ago | |
|---|---|---|
| .gitignore | 1 year ago | |
| .gitignore.swp | 1 year ago | |
| README.md | 1 year ago | |
| runregexp.go | 1 year ago | |
README.md
RUNREGEXP
runregexp is a convenience script for running a series of tests against a regular expression. It is intended for use in testing regular expressions for use with the Golang Standard Library regexp module. It compiles a single regular expression from a test config file and calls its MatchString method on a number of supplied candidate strings, some of which are expected to match and others of which are not. In any case where the expectation is not met, it displays the offending input string.
Use
Tests are put in a file called tests.json in the same directory from which the binary is run.
This file has the following format:
{
"test_expression": "regular_expression_to_test",
"fail_candidates": [
"string_expected_NOT_to_match",
...
],
"succeed_candidates": [
"string_expected_to_match",
...
]
}