Bug 19335: Fix 00-merge-conflict-markers.t when dockerised
This does not make sense, but fix a bug (why?) Without this patch, the tests failed on po files: [17:14:26] t/00-merge-conflict-markers.t .. Failed 1/1 subtests Test Summary Report ------------------- t/00-merge-conflict-markers.t (Wstat: 9 Tests: 0 Failed: 0) Non-zero wait status: 9 Parse errors: Bad plan. You planned 1 tests but ran 0. Result: FAIL Note that this is not related to bug 19227. if the ^>>>>>> and ^<<<<<< matches are done on the same line, the test fail As saw it failed on *-pref.po files misc/translator/po/kn-Knda-pref.po misc/translator/po/ja-Jpan-JP-pref.po misc/translator/po/nl-BE-pref.po misc/translator/po/sr-Cyrl-pref.po Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
5bb19808bb
commit
0d03f143e2
|
|
@ -38,14 +38,11 @@ find({
|
|||
|
||||
my $fh = IO::File->new($file, 'r');
|
||||
my $marker_found = 0;
|
||||
my $line = 0;
|
||||
while (<$fh>) {
|
||||
$line++;
|
||||
if (/^<<<<<</ or /^>>>>>>/) {
|
||||
# could check for ^=====, but that's often used in text files
|
||||
$marker_found = 1;
|
||||
last;
|
||||
}
|
||||
while (my $line = <$fh>) {
|
||||
# could check for ^=====, but that's often used in text files
|
||||
$marker_found++ if $line =~ m|^<<<<<<|;
|
||||
$marker_found++ if $line =~ m|^>>>>>>|;
|
||||
last if $marker_found;
|
||||
}
|
||||
close $fh;
|
||||
push @failures, $file if $marker_found;
|
||||
|
|
|
|||
Loading…
Reference in New Issue