On 01/07/2020 12.05, Paolo Bonzini wrote:
On 01/07/20 11:52, Thomas Huth wrote:
+function find_word()
+{
+ grep -q " $1 " <<< " $2 "
+}
Ah, clever idea with the surrounding spaces here!
That's what you gain from learning to program in GW-BASIC, who wants
regular expression when you have INSTR.
But seriously: what do you think about adding "-F"? The use of regex in
only_tests/only_group is not documented and might have surprising
effects. If we want to keep it, we could replace spaces with newlines
and use ^$ in the regex.
-F sounds fine to me. I'm not aware of anybody trying to use regular
expressions in the list of tests, so that should be fine, I think.
Thomas