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).
Remove all the obsoleted files from the old tester:
test-suite/javascript.html
test-suite/procmail-re-test.sh
test-suite/result.txt
test-suite/test-suite.sh
New tests/regex-tester.sh script
New tests/regex-tester.txt script output record
New tests/Dockerfile image with all the txt2regex-supported programs
installed and ready to be used
New make target: test-regex to run the tester and save to the output
file
New make target: test-regex-shell to enter the interactive shell
inside the test container.
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
).Remove all the obsoleted files from the old tester:
test-suite/javascript.html
test-suite/procmail-re-test.sh
test-suite/result.txt
test-suite/test-suite.sh
New
tests/regex-tester.sh
scriptNew
tests/regex-tester.txt
script output recordNew
tests/Dockerfile
image with all the txt2regex-supported programs installed and ready to be usedNew make target:
test-regex
to run the tester and save to the output fileNew make target:
test-regex-shell
to enter the interactive shell inside the test container.