mirror of
https://github.com/uutils/grep.git
synced 2026-06-10 16:15:11 -07:00
e3d80f59e2
GNU grep's PCRE backend supports only a single pattern. Supplying
multiple patterns via repeated -e flags, or a pattern string that
contains a literal newline, must exit 2 with the message:
the -P option only supports a single pattern
Add the validation immediately after patterns are collected, before
regex-mode selection. Add a test covering:
- two separate -e flags with -P
- a newline-embedded pattern string with -P
- single -e with -P still works normally
Closes #34