Is your feature request related to a problem? Please describe.
Currently, tests can only be executed with PCRE2. They should be executable with a regex engine for every flavor. Also, the --test <ENGINE> CLI interface is confusing.
Describe the solution you'd like
Extend the supported engines to include at least the following:
Getting C# to work cross-platform is more tricky, which is why it isn't included in this list for now.
Strategies
- Rust, Oniguruma: Regex engine is statically linked in the executable
- Python:
python3 -c ...; fallback to python executable if unavailable
- Node:
node -e ...
- Deno:
deno eval ...
- Java:
java with a temporary class file
Batch checking
A command that tests all pomsky expressions in a directory would be immensely helpful, e.g. for pre-commit hooks and CI. It should
- walk the provided directory recursively, respecting
.gitignore and .pomskyignore files
- follow symlinks ??
- compile and test all files with a
.pomsky extension
- if not using a statically linked regex library, re-use the process that does the testing for all files (similarly to
regex-test)
- provide a summary (number of succeeded/failed tests) and errors
Is your feature request related to a problem? Please describe.
Currently, tests can only be executed with PCRE2. They should be executable with a regex engine for every flavor. Also, the
--test <ENGINE>CLI interface is confusing.Describe the solution you'd like
Extend the supported engines to include at least the following:
pcre2rustonigpythonnodedenojavaGetting C# to work cross-platform is more tricky, which is why it isn't included in this list for now.
Strategies
python3 -c ...; fallback topythonexecutable if unavailablenode -e ...deno eval ...javawith a temporary class fileBatch checking
A command that tests all pomsky expressions in a directory would be immensely helpful, e.g. for pre-commit hooks and CI. It should
.gitignoreand.pomskyignorefiles.pomskyextensionregex-test)