diff options
author | Andrew Hewus Fresh <afresh1@openbsd.org> | 2023-02-15 16:28:58 -0800 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2023-02-17 21:23:43 +0800 |
commit | 54446d4f70689e0027bf1e9ba86be8bca9904ee4 (patch) | |
tree | aed6d4c9d8dfc7ffbb4959af703d0d65ce305612 /t/comp | |
parent | e10136381f204656bed6dd3623bd257de638c027 (diff) | |
download | perl-54446d4f70689e0027bf1e9ba86be8bca9904ee4.tar.gz |
Calculate conflict markers instead of hardcoding
It turns out that some tooling (Game of Trees) has special handling for
conflict markers and will continually mark files that have them.
Since the test doesn't actually need them to be expanded,
calculate them instead to not trigger the detection.
Diffstat (limited to 't/comp')
-rw-r--r-- | t/comp/parser.t | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/t/comp/parser.t b/t/comp/parser.t index a2a432d8f9..dbd5ecc842 100644 --- a/t/comp/parser.t +++ b/t/comp/parser.t @@ -580,16 +580,13 @@ eval 'qq{@{0]}${}},{})'; is(1, 1, "RT #124207"); # RT #127993 version control conflict markers +my @conflict_markers = map { $_ x 7 } qw( < = > ); " this should keep working -<<<<<<< +$conflict_markers[0] " =~ / ->>>>>>> +$conflict_markers[2] /; -for my $marker (qw( -<<<<<<< -======= ->>>>>>> -)) { +for my $marker (@conflict_markers) { eval "$marker"; like $@, qr/^Version control conflict marker at \(eval \d+\) line 1, near "$marker"/, "VCS marker '$marker' at beginning"; eval "\$_\n$marker"; |