From: Collin Funk Date: Mon, 26 Jan 2026 01:12:18 +0000 (-0800) Subject: tests: tac: test --regex with anchors in the separator X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bd3e8bb7a2ab0535b59411bdd345c669e0a856b;p=thirdparty%2Fcoreutils.git tests: tac: test --regex with anchors in the separator * tests/tac/tac.pl (@Tests): Add a few test cases. --- diff --git a/tests/tac/tac.pl b/tests/tac/tac.pl index 576978aea9..99d2d0d504 100755 --- a/tests/tac/tac.pl +++ b/tests/tac/tac.pl @@ -63,6 +63,10 @@ my @Tests = {IN=>"a.___b.__1._2.__3.___4._"}, {OUT=>"4._3.___2.__1._b.__a.___"}], + ['opt-r3', qw(-r -s '^'), {IN=>"a\nb\nc\n"}, {OUT=>"c\nb\na\n"}], + ['opt-r4', qw(-r -s '$'), {IN=>"a\nb\nc\n"}, {OUT=>"\n\nc\nba"}], + ['opt-r5', qw(-r -s '^$'), {IN=>"a\nb\nc\n"}, {OUT=>"a\nb\nc\n"}], + # This gave incorrect output (.___4._2.__3._1) with tac-1.22. ['opt-br', qw(-b -r -s '\._+'), {IN=>"._1._2.__3.___4"}, {OUT=>".___4.__3._2._1"}],