diff options
Diffstat (limited to 'testsuite/sed.tests')
-rwxr-xr-x | testsuite/sed.tests | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/sed.tests b/testsuite/sed.tests index a9d9ada31..696d980ef 100755 --- a/testsuite/sed.tests +++ b/testsuite/sed.tests | |||
@@ -241,4 +241,11 @@ testing "sed 2d;2,1p (gnu compat)" \ | |||
241 | "third\n" "" \ | 241 | "third\n" "" \ |
242 | "first\nsecond\nthird\nfourth\n" | 242 | "first\nsecond\nthird\nfourth\n" |
243 | 243 | ||
244 | # Regex means: "match / at BOL or nothing, then one or more not-slashes". | ||
245 | # The bug was that second slash in /usr/lib was treated as "at BOL" too. | ||
246 | testing "sed beginning (^) matches only once" \ | ||
247 | "sed 's,\(^/\|\)[^/][^/]*,>\0<,g'" \ | ||
248 | ">/usr</>lib<\n" "" \ | ||
249 | "/usr/lib\n" | ||
250 | |||
244 | exit $FAILCOUNT | 251 | exit $FAILCOUNT |