Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Jemplate CPAN distribution.

Report information
The Basics
Id: 87566
Status: open
Priority: 0/
Queue: Jemplate

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: t/macro.t first test fails since 5.17.9
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.16-16158-1375526695-430.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 886
Download (untitled) / with headers
text/plain 886b
Following failure appears since perl 5.17.9 <http://matrix.cpantesters.org/?dist=Jemplate+0.27>. Also with stable perl 5.18.0: $ perl -Ilib t/macro.t 1..3 not ok 1 - # @@ -1,4 +1,4 @@ # -//line 1 "test_template" # +//line 2 "test_template" # # //MACRO # stash.set('simple', function () { # @@ -16,5 +16,5 @@ # # context.stash.clone(args); # try { # -//line 1 "test_template" # +//line 2 "test_template" # output += stash.get('param1') + stash.get('param2'); # # Failed test ' # @@ -1,4 +1,4 @@ # -//line 1 "test_template" # +//line 2 "test_template" # # //MACRO # stash.set('simple', function () { # @@ -16,5 +16,5 @@ # # context.stash.clone(args); # try { # -//line 1 "test_template" # +//line 2 "test_template" # output += stash.get('param1') + stash.get('param2'); # ' # at t/macro.t line 8. ok 2 ok 3 # Looks like you failed 1 test of 3.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.16-16158-1375526695-430.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.16-16158-1375526695-430.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.16-30442-1375705528-354.87566-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 38
I get the same error using Perl 5.16.3
MIME-Version: 1.0
In-Reply-To: <rt-4.0.16-30442-1375705528-354.87566-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: API
References: <rt-4.0.16-16158-1375526695-430.0-0-0 [...] rt.cpan.org> <rt-4.0.16-30442-1375705528-354.87566-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.16-30594-1377871339-1265.0-0-0 [...] rt.cpan.org>
Message-ID: <rt-4.0.16-30594-1377871339-1285.87566-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
From: jplesnik [...] redhat.com
Content-Length: 269
Download (untitled) / with headers
text/plain 269b
The failure is caused by a change in Template::Parser (Teplate::Toolkit 2.25) In the function split_text, the line counter is increase, if newlines is in chomped whitespaces. There is a new line symbol at the end of macro definition, which increase the line counter.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.16-30594-1377871339-1265.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: API
References: <rt-4.0.16-16158-1375526695-430.0-0-0 [...] rt.cpan.org> <rt-4.0.16-30442-1375705528-354.87566-0-0 [...] rt.cpan.org> <rt-4.0.16-30594-1377871339-1265.0-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1377875260-30598-2"
Message-ID: <rt-4.0.16-30598-1377875260-312.0-0-0 [...] rt.cpan.org>
Message-ID: <rt-4.0.16-30598-1377875260-1586.87566-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
From: jplesnik [...] redhat.com
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 345
Download (untitled) / with headers
text/plain 345b
On Fri Aug 30 10:02:19 2013, jplesnik wrote: Show quoted text
> The failure is caused by a change in Template::Parser > (Teplate::Toolkit 2.25) > > In the function split_text, the line counter is increase, if newlines > is in chomped whitespaces. > There is a new line symbol at the end of macro definition, which > increase the line counter.
Patch for test.
MIME-Version: 1.0
Subject: Fix_macro_t.patch
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Type: text/x-patch; name="Fix_macro_t.patch"
Content-Disposition: inline; filename="Fix_macro_t.patch"
Content-Transfer-Encoding: binary
Content-Length: 346
Download Fix_macro_t.patch
text/x-diff 346b
diff -up Jemplate-0.27/t/macro.t.orig Jemplate-0.27/t/macro.t --- Jemplate-0.27/t/macro.t.orig 2013-08-30 16:04:44.490408686 +0200 +++ Jemplate-0.27/t/macro.t 2013-08-30 17:03:06.613738405 +0200 @@ -16,8 +16,7 @@ __END__ [% MACRO simple(param1,param2) BLOCK; param1 _ param2; - END; -%] + END; %] --- js -trim //line 1 "test_template"
From ingy [...] ingy.net Fri Aug 30 12: 34:11 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-4.342 tagged_above=-99.9 required=10 tests=[AWL=2.557, BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5] autolearn=ham
In-Reply-To: <rt-4.0.16-30598-1377875260-221.87566-5-0 [...] rt.cpan.org>
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-87566 [...] rt.cpan.org> <rt-4.0.16-16158-1375526695-430.87566-5-0 [...] rt.cpan.org> <rt-4.0.16-30442-1375705528-354.87566-5-0 [...] rt.cpan.org> <rt-4.0.16-30594-1377871339-1265.87566-5-0 [...] rt.cpan.org> <rt-4.0.16-30598-1377875260-221.87566-5-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Received: by 10.194.86.5 with SMTP id l5mr2534714wjz.45.1377880440443; Fri, 30 Aug 2013 09:34:00 -0700 (PDT)
Message-ID: <CAHJtQJ583taxXoCx_iyWPj6PmA5y1WFzeUfHcXFbfyQVXKfy0w [...] mail.gmail.com>
Content-Type: multipart/alternative; boundary="089e0102deee3228af04e52cca16"
X-Spam-Score: -4.342
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 3D38A241222 for <cpan-bug+Jemplate [...] hipster.bestpractical.com>; Fri, 30 Aug 2013 12:34:11 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ohopCldyuSp5 for <cpan-bug+Jemplate [...] hipster.bestpractical.com>; Fri, 30 Aug 2013 12:34:10 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id BB2C024050A for <bug-Jemplate [...] rt.cpan.org>; Fri, 30 Aug 2013 12:34:09 -0400 (EDT)
Received: (qmail 2599 invoked by alias); 30 Aug 2013 16:34:09 -0000
Received: from mail-we0-f180.google.com (HELO mail-we0-f180.google.com) (74.125.82.180) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 30 Aug 2013 09:34:05 -0700
Received: by mail-we0-f180.google.com with SMTP id q58so1771449wes.39 for <bug-Jemplate [...] rt.cpan.org>; Fri, 30 Aug 2013 09:34:00 -0700 (PDT)
Received: by 10.227.213.195 with HTTP; Fri, 30 Aug 2013 09:34:00 -0700 (PDT)
Delivered-To: cpan-bug+Jemplate [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #87566] t/macro.t first test fails since 5.17.9
Return-Path: <ingy [...] ingy.net>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+Jemplate [...] hipster.bestpractical.com
X-RT-Mail-Extension: jemplate
X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=+qsERFSB/AGpurhDl2fOEhfBuDE7hSFGXpKB9OaVH/I=; b=cxKaAPAeX90FxbKFu4d+kM2KsQJCEVmfKvjT9xSS22nN9XGmsZ6AKS2OW181AgHa98 Y6lG5Bw1XjFLYVKlQSpO25rlchx8jZPTk9jxBj/gSYQB1aHA6t3iE0CIwfLEM0uUgScS dvWTReR2aEbZX/Mfzrcj+9Rmxb4+FeP4OJoio3urvuz+t5goiz0FyCAgXOKnlBKEgrO2 Uew6uhOq60r4eLVQDF0u0a4zAr2js2PPUFZ6yWK8+R7y2Qd3hXoFwutCqGeTYsv+hE4w lH6XN0u8t/IND+UaYastj8HQeO7JWEr7wgevswSbH2PZzAXnzSTpOni1Pa6SUpzUKrUo 2OVw==
Date: Fri, 30 Aug 2013 09:34:00 -0700
X-Spam-Level:
To: bug-Jemplate [...] rt.cpan.org
X-GM-Message-State: ALoCoQkumc6IyR8qyHS99A2NqgqnbZoaonrJLXoo749V11tDhqzx7RJw9EdLV0G8/QDLrZ/eKRJF
From: Ingy dot Net <ingy [...] ingy.net>
RT-Message-ID: <rt-4.0.16-31684-1377880451-560.87566-0-0 [...] rt.cpan.org>
Content-Length: 0
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Content-Length: 581
Download (untitled) / with headers
text/plain 581b
Thanks! I'll take a look. On Fri, Aug 30, 2013 at 8:07 AM, Jitka Plesnikova via RT < bug-Jemplate@rt.cpan.org> wrote: Show quoted text
> Queue: Jemplate > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=87566 > > > On Fri Aug 30 10:02:19 2013, jplesnik wrote:
> > The failure is caused by a change in Template::Parser > > (Teplate::Toolkit 2.25) > > > > In the function split_text, the line counter is increase, if newlines > > is in chomped whitespaces. > > There is a new line symbol at the end of macro definition, which > > increase the line counter.
> > > Patch for test. >
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 1074
MIME-Version: 1.0
In-Reply-To: <rt-4.0.16-31684-1377880451-560.87566-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: API
References: <RT-Ticket-87566 [...] rt.cpan.org> <rt-4.0.16-16158-1375526695-430.87566-5-0 [...] rt.cpan.org> <rt-4.0.16-30442-1375705528-354.87566-5-0 [...] rt.cpan.org> <rt-4.0.16-30594-1377871339-1265.87566-5-0 [...] rt.cpan.org> <rt-4.0.16-30598-1377875260-221.87566-5-0 [...] rt.cpan.org> <CAHJtQJ583taxXoCx_iyWPj6PmA5y1WFzeUfHcXFbfyQVXKfy0w [...] mail.gmail.com> <rt-4.0.16-31684-1377880451-560.87566-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1378104502-28544-2"
Message-ID: <rt-4.0.16-28544-1378104502-1238.0-0-0 [...] rt.cpan.org>
Message-ID: <rt-4.0.16-28544-1378104502-380.87566-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
From: jplesnik [...] redhat.com
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 762
Download (untitled) / with headers
text/plain 762b
I was wrong, the new lines at the begin of directive are count. Updated patch attached. On Fri Aug 30 12:34:11 2013, ingy@ingy.net wrote: Show quoted text
> Thanks! I'll take a look. > > > On Fri, Aug 30, 2013 at 8:07 AM, Jitka Plesnikova via RT < > bug-Jemplate@rt.cpan.org> wrote: >
> > Queue: Jemplate > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=87566 > > > > > On Fri Aug 30 10:02:19 2013, jplesnik wrote:
> > > The failure is caused by a change in Template::Parser > > > (Teplate::Toolkit 2.25) > > > > > > In the function split_text, the line counter is increase, if newlines > > > is in chomped whitespaces. > > > There is a new line symbol at the end of macro definition, which > > > increase the line counter.
> > > > > > Patch for test. > >
MIME-Version: 1.0
Subject: Fix_macro_t.patch
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Type: text/x-patch; name="Fix_macro_t.patch"
Content-Disposition: inline; filename="Fix_macro_t.patch"
Content-Transfer-Encoding: binary
Content-Length: 415
Download Fix_macro_t.patch
text/x-diff 415b
diff -up Jemplate-0.27/t/macro.t.orig Jemplate-0.27/t/macro.t --- Jemplate-0.27/t/macro.t.orig 2013-08-30 16:04:44.490408686 +0200 +++ Jemplate-0.27/t/macro.t 2013-09-02 08:04:43.968793401 +0200 @@ -13,11 +13,9 @@ __END__ === --- macro_definition -[% - MACRO simple(param1,param2) BLOCK; +[% MACRO simple(param1,param2) BLOCK; param1 _ param2; - END; -%] + END; %] --- js -trim //line 1 "test_template"
MIME-Version: 1.0
In-Reply-To: <rt-4.0.16-28544-1378104502-1238.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: API
References: <RT-Ticket-87566 [...] rt.cpan.org> <rt-4.0.16-16158-1375526695-430.87566-5-0 [...] rt.cpan.org> <rt-4.0.16-30442-1375705528-354.87566-5-0 [...] rt.cpan.org> <rt-4.0.16-30594-1377871339-1265.87566-5-0 [...] rt.cpan.org> <rt-4.0.16-30598-1377875260-221.87566-5-0 [...] rt.cpan.org> <CAHJtQJ583taxXoCx_iyWPj6PmA5y1WFzeUfHcXFbfyQVXKfy0w [...] mail.gmail.com> <rt-4.0.16-31684-1377880451-560.87566-0-0 [...] rt.cpan.org> <rt-4.0.16-28544-1378104502-1238.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-20683-1385946695-208.0-0-0 [...] rt.cpan.org>
Message-ID: <rt-4.0.18-20683-1385946695-1722.87566-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
From: dsteinbrunner [...] pobox.com
Content-Length: 224
Download (untitled) / with headers
text/plain 224b
On Mon Sep 02 02:48:22 2013, jplesnik wrote: Show quoted text
> I was wrong, the new lines at the begin of directive are count. > > Updated patch attached.
Pull request for this patch is here: https://github.com/ingydotnet/jemplate/pull/20


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.