initial commit
commit
a6277c3386
@ -0,0 +1 @@
|
||||
*.swp
|
||||
Binary file not shown.
@ -0,0 +1,23 @@
|
||||
# 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:
|
||||
|
||||
```json
|
||||
{
|
||||
"test_expression": "regular_expression_to_test",
|
||||
"fail_candidates": [
|
||||
"string_expected_NOT_to_match",
|
||||
...
|
||||
],
|
||||
"succeed_candidates": [
|
||||
"string_expected_to_match",
|
||||
...
|
||||
]
|
||||
}
|
||||
```
|
||||
Loading…
Reference in New Issue