aureliojargas / txt2regex

Regex wizard for the terminal, written in Bash
https://aurelio.net/projects/txt2regex/
GNU General Public License v2.0
183 stars 26 forks source link

New regex tester (runs in a Docker container) #6

Closed aureliojargas closed 4 years ago

aureliojargas commented 4 years ago

Txt2regex needs to know regex-related information for each program it supports. For example: the list of metacharacters, how to escape a metacharacter to match it literally and the availability of POSIX character classes.

Instead of relying in documentation to get that information, there's a new tests/regex-tester.sh script that calls the real programs with specially crafted regexes and sample texts, verifying how those programs behave in "real life".

To have a trackable and public record, the output of this tester is also saved to this repository, in a readable and grepable plain text file. This way we can detect changes in behavior when a program version is updated.

To avoid having to install specific software in the developer machine, a Docker image is used to isolate all the necessary software and this script is run inside that image (via make test-regex).