On Wed, Jul 09, 2014 at 09:08:40AM +0100, Jonathan Wakely wrote: > >Thus the plan would be *all* the regex testcases in a single file!?! If I > >understand correctly, that certainly doesn't make sense. In any > > Jakub pointed out that there are lots of useful tests for regexes in > the glibc testsuite. I think it might make sense to have a file of > tests cases that contains separate fields such as the input string, > the regex, the flags, and the expected result. Then a test case could > loop over the contents of that file and run every test.
Most of those glibc tests are actually text file driven, where you have a small testcase driver which opens the text file, parses it and invokes regex on the pattern in one column, text to search in another one, with some flags etc. in yet other columns. 4 different file formats I think, each with hundreds of individual tests. The reason for different file formats is where those come from, there are e.g. boost regex tests, rxspencer regex tests, pcre tests and then supposedly glibc's own old format. Jakub