Patchwork [2,of,3,highlight] test-highlight: expose bug in highlighting file with a formfeed

login
register
mail settings
Submitter Augie Fackler
Date Dec. 17, 2014, 1:46 a.m.
Message ID <8d5d9431112bbf7ef694.1418780819@130.17.16.172.in-addr.arpa>
Download mbox | patch
Permalink /patch/7138/
State Superseded
Delegated to: Pierre-Yves David
Headers show

Comments

Augie Fackler - Dec. 17, 2014, 1:46 a.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1418765077 18000
#      Tue Dec 16 16:24:37 2014 -0500
# Node ID 8d5d9431112bbf7ef694437217f0cd919d6856fd
# Parent  4f724b91a9ddf395bd756988584f40af6de0cd88
test-highlight: expose bug in highlighting file with a formfeed
Pierre-Yves David - Dec. 17, 2014, 2:39 a.m.
On 12/16/2014 05:46 PM, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <raf@durin42.com>
> # Date 1418765077 18000
> #      Tue Dec 16 16:24:37 2014 -0500
> # Node ID 8d5d9431112bbf7ef694437217f0cd919d6856fd
> # Parent  4f724b91a9ddf395bd756988584f40af6de0cd88
> test-highlight: expose bug in highlighting file with a formfeed
>
> diff --git a/tests/test-highlight.t b/tests/test-highlight.t
> --- a/tests/test-highlight.t
> +++ b/tests/test-highlight.t
> @@ -186,6 +186,105 @@ hgweb filerevision, html
>     </body>
>     </html>
>
> +file with exotic linebreak is not highlighted (currently broken)

It is unclear what is broken, could you be a bit more precise in the 
test documentation?

(yes I'm playing "the guy who did not got the over the phone explanation)
Augie Fackler - Dec. 17, 2014, 2:42 a.m.
On Dec 16, 2014 9:40 PM, "Pierre-Yves David" <pierre-yves.david@ens-lyon.org>
wrote:
>
>
>
> On 12/16/2014 05:46 PM, Augie Fackler wrote:
>>
>> # HG changeset patch
>> # User Augie Fackler <raf@durin42.com>
>> # Date 1418765077 18000
>> #      Tue Dec 16 16:24:37 2014 -0500
>> # Node ID 8d5d9431112bbf7ef694437217f0cd919d6856fd
>> # Parent  4f724b91a9ddf395bd756988584f40af6de0cd88
>> test-highlight: expose bug in highlighting file with a formfeed
>>
>> diff --git a/tests/test-highlight.t b/tests/test-highlight.t
>> --- a/tests/test-highlight.t
>> +++ b/tests/test-highlight.t
>> @@ -186,6 +186,105 @@ hgweb filerevision, html
>>     </body>
>>     </html>
>>
>> +file with exotic linebreak is not highlighted (currently broken)
>
>
> It is unclear what is broken, could you be a bit more precise in the test
documentation?
>
> (yes I'm playing "the guy who did not got the over the phone explanation)

It's fixed in the next patch. Do you really want a resend?

>
> --
> Pierre-Yves David
Pierre-Yves David - Dec. 17, 2014, 2:49 a.m.
On 12/16/2014 06:42 PM, Augie Fackler wrote:
>
> On Dec 16, 2014 9:40 PM, "Pierre-Yves David"
> <pierre-yves.david@ens-lyon.org <mailto:pierre-yves.david@ens-lyon.org>>
> wrote:
>  >
>  >
>  >
>  > On 12/16/2014 05:46 PM, Augie Fackler wrote:
>  >>
>  >> # HG changeset patch
>  >> # User Augie Fackler <raf@durin42.com <mailto:raf@durin42.com>>
>  >> # Date 1418765077 18000
>  >> #      Tue Dec 16 16:24:37 2014 -0500
>  >> # Node ID 8d5d9431112bbf7ef694437217f0cd919d6856fd
>  >> # Parent  4f724b91a9ddf395bd756988584f40af6de0cd88
>  >> test-highlight: expose bug in highlighting file with a formfeed
>  >>
>  >> diff --git a/tests/test-highlight.t b/tests/test-highlight.t
>  >> --- a/tests/test-highlight.t
>  >> +++ b/tests/test-highlight.t
>  >> @@ -186,6 +186,105 @@ hgweb filerevision, html
>  >>     </body>
>  >>     </html>
>  >>
>  >> +file with exotic linebreak is not highlighted (currently broken)
>  >
>  >
>  > It is unclear what is broken, could you be a bit more precise in the
> test documentation?
>  >
>  > (yes I'm playing "the guy who did not got the over the phone explanation)
>
> It's fixed in the next patch. Do you really want a resend?

My goal here is to ensure that the next poor soul looking at that test 
have an idea about why it exists. And I think the current description is 
too terse.
Augie Fackler - Dec. 17, 2014, 2:52 a.m.
On Dec 16, 2014 9:50 PM, "Pierre-Yves David" <pierre-yves.david@ens-lyon.org>
wrote:
>
>
>
> On 12/16/2014 06:42 PM, Augie Fackler wrote:
>>
>>
>> On Dec 16, 2014 9:40 PM, "Pierre-Yves David"
>> <pierre-yves.david@ens-lyon.org <mailto:pierre-yves.david@ens-lyon.org>>
>>
>> wrote:
>>  >
>>  >
>>  >
>>  > On 12/16/2014 05:46 PM, Augie Fackler wrote:
>>  >>
>>  >> # HG changeset patch
>>  >> # User Augie Fackler <raf@durin42.com <mailto:raf@durin42.com>>
>>
>>  >> # Date 1418765077 18000
>>  >> #      Tue Dec 16 16:24:37 2014 -0500
>>  >> # Node ID 8d5d9431112bbf7ef694437217f0cd919d6856fd
>>  >> # Parent  4f724b91a9ddf395bd756988584f40af6de0cd88
>>  >> test-highlight: expose bug in highlighting file with a formfeed
>>  >>
>>  >> diff --git a/tests/test-highlight.t b/tests/test-highlight.t
>>  >> --- a/tests/test-highlight.t
>>  >> +++ b/tests/test-highlight.t
>>  >> @@ -186,6 +186,105 @@ hgweb filerevision, html
>>  >>     </body>
>>  >>     </html>
>>  >>
>>  >> +file with exotic linebreak is not highlighted (currently broken)
>>  >
>>  >
>>  > It is unclear what is broken, could you be a bit more precise in the
>> test documentation?
>>  >
>>  > (yes I'm playing "the guy who did not got the over the phone
explanation)
>>
>> It's fixed in the next patch. Do you really want a resend?
>
>
> My goal here is to ensure that the next poor soul looking at that test
have an idea about why it exists. And I think the current description is
too terse.

Why don't we document what's going on in that patch then?

(Genuinely confused here. )

>
> --
> Pierre-Yves David
Pierre-Yves David - Dec. 17, 2014, 9:43 a.m.
On 12/16/2014 06:52 PM, Augie Fackler wrote:
>
> On Dec 16, 2014 9:50 PM, "Pierre-Yves David"
> <pierre-yves.david@ens-lyon.org <mailto:pierre-yves.david@ens-lyon.org>>
> wrote:
>  >
>  >
>  >
>  > On 12/16/2014 06:42 PM, Augie Fackler wrote:
>  >>
>  >>
>  >> On Dec 16, 2014 9:40 PM, "Pierre-Yves David"
>  >> <pierre-yves.david@ens-lyon.org
> <mailto:pierre-yves.david@ens-lyon.org>
> <mailto:pierre-yves.david@ens-lyon.org
> <mailto:pierre-yves.david@ens-lyon.org>>>
>  >>
>  >> wrote:
>  >>  >
>  >>  >
>  >>  >
>  >>  > On 12/16/2014 05:46 PM, Augie Fackler wrote:
>  >>  >>
>  >>  >> # HG changeset patch
>  >>  >> # User Augie Fackler <raf@durin42.com <mailto:raf@durin42.com>
> <mailto:raf@durin42.com <mailto:raf@durin42.com>>>
>  >>
>  >>  >> # Date 1418765077 18000
>  >>  >> #      Tue Dec 16 16:24:37 2014 -0500
>  >>  >> # Node ID 8d5d9431112bbf7ef694437217f0cd919d6856fd
>  >>  >> # Parent  4f724b91a9ddf395bd756988584f40af6de0cd88
>  >>  >> test-highlight: expose bug in highlighting file with a formfeed
>  >>  >>
>  >>  >> diff --git a/tests/test-highlight.t b/tests/test-highlight.t
>  >>  >> --- a/tests/test-highlight.t
>  >>  >> +++ b/tests/test-highlight.t
>  >>  >> @@ -186,6 +186,105 @@ hgweb filerevision, html
>  >>  >>     </body>
>  >>  >>     </html>
>  >>  >>
>  >>  >> +file with exotic linebreak is not highlighted (currently broken)
>  >>  >
>  >>  >
>  >>  > It is unclear what is broken, could you be a bit more precise in the
>  >> test documentation?
>  >>  >
>  >>  > (yes I'm playing "the guy who did not got the over the phone
> explanation)
>  >>
>  >> It's fixed in the next patch. Do you really want a resend?
>  >
>  >
>  > My goal here is to ensure that the next poor soul looking at that
> test have an idea about why it exists. And I think the current
> description is too terse.
>
> Why don't we document what's going on in that patch then?
>
> (Genuinely confused here. )

So, my final goal is that if there is anything "strange" with that test 
(like, it disable a feature because the feature is broken in case X), I 
would like the test to explain that it test that Y in disable when X 
because Z is broken. And if Z because unbroken, the test can be dropped.

Even if the code disabling X is commented, having some data around the 
text will help someone in three year for now.

I that less confusing?
Augie Fackler - Dec. 17, 2014, 4:16 p.m.
On Dec 17, 2014, at 4:43 AM, Pierre-Yves David <pierre-yves.david@ens-lyon.org> wrote:

>> Why don't we document what's going on in that patch then?
>> 
>> (Genuinely confused here. )
> 
> So, my final goal is that if there is anything "strange" with that test (like, it disable a feature because the feature is broken in case X), I would like the test to explain that it test that Y in disable when X because Z is broken. And if Z because unbroken, the test can be dropped.
> 
> Even if the code disabling X is commented, having some data around the text will help someone in three year for now.
> 
> I that less confusing?

Mailed a v2, but forgot the v2 flag. You're cc'ed, so at least I got that part right.

Patch

diff --git a/tests/test-highlight.t b/tests/test-highlight.t
--- a/tests/test-highlight.t
+++ b/tests/test-highlight.t
@@ -186,6 +186,105 @@  hgweb filerevision, html
   </body>
   </html>
   
+file with exotic linebreak is not highlighted (currently broken)
+  $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/with-ff.py') \
+  >     | sed "s/class=\"k\"/class=\"kn\"/g" | sed "s/class=\"mf\"/class=\"mi\"/g"
+  200 Script output follows
+  
+  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
+  <head>
+  <link rel="icon" href="/static/hgicon.png" type="image/png" />
+  <meta name="robots" content="index, nofollow" />
+  <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
+  <script type="text/javascript" src="/static/mercurial.js"></script>
+  
+  <link rel="stylesheet" href="/highlightcss" type="text/css" />
+  <title>test: 561b8b6483ac with-ff.py</title>
+  </head>
+  <body>
+  
+  <div class="container">
+  <div class="menu">
+  <div class="logo">
+  <a href="http://mercurial.selenic.com/">
+  <img src="/static/hglogo.png" alt="mercurial" /></a>
+  </div>
+  <ul>
+  <li><a href="/shortlog/561b8b6483ac">log</a></li>
+  <li><a href="/graph/561b8b6483ac">graph</a></li>
+  <li><a href="/tags">tags</a></li>
+  <li><a href="/bookmarks">bookmarks</a></li>
+  <li><a href="/branches">branches</a></li>
+  </ul>
+  <ul>
+  <li><a href="/rev/561b8b6483ac">changeset</a></li>
+  <li><a href="/file/561b8b6483ac/">browse</a></li>
+  </ul>
+  <ul>
+  <li class="active">file</li>
+  <li><a href="/file/tip/with-ff.py">latest</a></li>
+  <li><a href="/diff/561b8b6483ac/with-ff.py">diff</a></li>
+  <li><a href="/comparison/561b8b6483ac/with-ff.py">comparison</a></li>
+  <li><a href="/annotate/561b8b6483ac/with-ff.py">annotate</a></li>
+  <li><a href="/log/561b8b6483ac/with-ff.py">file log</a></li>
+  <li><a href="/raw-file/561b8b6483ac/with-ff.py">raw</a></li>
+  </ul>
+  <ul>
+  <li><a href="/help">help</a></li>
+  </ul>
+  </div>
+  
+  <div class="main">
+  <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
+  <h3>view with-ff.py @ 0:561b8b6483ac</h3>
+  
+  <form class="search" action="/log">
+  
+  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <div id="hint">Find changesets by keywords (author, files, the commit message), revision
+  number or hash, or <a href="/help/revsets">revset expression</a>.</div>
+  </form>
+  
+  <div class="description">a</div>
+  
+  <table id="changesetEntry">
+  <tr>
+   <th class="author">author</th>
+   <td class="author">&#116;&#101;&#115;&#116;</td>
+  </tr>
+  <tr>
+   <th class="date">date</th>
+   <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+  </tr>
+  <tr>
+   <th class="author">parents</th>
+   <td class="author"></td>
+  </tr>
+  <tr>
+   <th class="author">children</th>
+   <td class="author"></td>
+  </tr>
+  </table>
+  
+  <div class="overflow">
+  <div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div>
+  <div class="sourcefirst"> line source</div>
+  <pre class="sourcelines stripes4 wrap">
+  <span id="l1"><span class="n">x</span> <span class="o">=</span> <span class="mi">1</span></span><a href="#l1"></a>
+  <span id="l2"><span class="n">x</span><span class="o">=</span><span class="mi">2</span></span><a href="#l2"></a></pre>
+  <div class="sourcelast"></div>
+  </div>
+  </div>
+  </div>
+  
+  <script type="text/javascript">process_dates()</script>
+  
+  
+  </body>
+  </html>
+  
+
 hgweb fileannotate, html
 
   $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'annotate/tip/primes.py') \