Bugzilla – Attachment 67190 Details for
Bug 19335
00-merge-markers.t fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19335: Fix 00-merge-conflict-markers.t when dockerised
Bug-19335-Fix-00-merge-conflict-markerst-when-dock.patch (text/plain), 1.92 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-09-18 17:31:25 UTC
(
hide
)
Description:
Bug 19335: Fix 00-merge-conflict-markers.t when dockerised
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-09-18 17:31:25 UTC
Size:
1.92 KB
patch
obsolete
>From adc41bc9376a1502b192ea9d4bfd20448c1f29d2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 18 Sep 2017 14:23:54 -0300 >Subject: [PATCH] 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> >--- > t/00-merge-conflict-markers.t | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) > >diff --git a/t/00-merge-conflict-markers.t b/t/00-merge-conflict-markers.t >index 2cbe8cf..86f7fa5 100644 >--- a/t/00-merge-conflict-markers.t >+++ b/t/00-merge-conflict-markers.t >@@ -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; >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19335
:
67189
| 67190