* Noteworthy changes in release ?.? (????-??-??) [?]
+** Bug fixes
+
+ ptx -S no longer infloops for a pattern which returns zero-length matches.
+ [the bug dates back to the initial implementation]
+
* Noteworthy changes in release 8.28 (2017-09-01) [stable]
case -1:
break;
+ case 0:
+ die (EXIT_FAILURE, 0,
+ _("error: regular expression has a match of length zero: %s"),
+ quote (context_regex.string));
+
default:
next_context_start = cursor + context_regs.end[0];
break;
{OUT=>".xx \"\" \"\" \"foo\" \"\"\n"}],
["format-t", '--format=tex', {IN=>"foo\n"},
{OUT=>"\\xx {}{}{foo}{}{}\n"}],
+
+# with coreutils-8.28 and earlier, the -S option would infloop with
+# matches of zero-length.
+["S-infloop", '-S ^', {IN=>"a\n"}, {EXIT=>1},
+ {ERR_SUBST=>'s/^.*reg.*ex.*length zero.*$/regexlzero/'},
+ {ERR=>"regexlzero\n"}],
);
@Tests = triple_test \@Tests;