annotate tests/test-highlight.out @ 10301:56b50194617f

templates: rename `Last change' column in hgwebdir repository list. This patch changes column headers in the templates that previously said `Last change' to `Last modified'. Neither code nor functionality are changed other than that. For some time now, I have been annoyed by the fact the `Last change' column didn't list the age of the youngest changeset in the repository, or at least tip. It just occurred to me that this is because the wording is slightly misleading; what the column in fact lists is when the repository was last *modified*, that is, when changesets was last added or removed from it. The word `change' can be understood as referring to the changeset itself. Using `changed' would be ever so slightly less amigous. However, the standard nomenclature in this case is `modification date' and `Last modified', which is incidentally entirely unambigous. Hence, `Last modified' is the wording used.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Sun, 24 Jan 2010 20:51:53 +0100
parents 4d9dea174b84
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
1 adding primes.py
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
2 % hg serve
6987
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
3 % hgweb filerevision, html
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
4 200 Script output follows
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
5
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
6 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
7 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
8 <head>
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
9 <link rel="icon" href="/static/hgicon.png" type="image/png" />
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
10 <meta name="robots" content="index, nofollow" />
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
11 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
12
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
13 <link rel="stylesheet" href="/highlightcss" type="text/css" />
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
14 <title>test: 853dcd4de2a6 primes.py</title>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
15 </head>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
16 <body>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
17
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
18 <div class="container">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
19 <div class="menu">
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
20 <div class="logo">
8936
1de6e7e1bb9f change wiki/bts URLs to point to new hostname
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8504
diff changeset
21 <a href="http://mercurial.selenic.com/">
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
22 <img src="/static/hglogo.png" alt="mercurial" /></a>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
23 </div>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
24 <ul>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
25 <li><a href="/shortlog/853dcd4de2a6">log</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
26 <li><a href="/graph/853dcd4de2a6">graph</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
27 <li><a href="/tags">tags</a></li>
8353
6058d291abdf paper/coal: add branches page
Sune Foldager <cryo@cyanite.org>
parents: 8083
diff changeset
28 <li><a href="/branches">branches</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
29 </ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
30 <ul>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
31 <li><a href="/rev/853dcd4de2a6">changeset</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
32 <li><a href="/file/853dcd4de2a6/">browse</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
33 </ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
34 <ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
35 <li class="active">file</li>
9720
bb00a159e594 coal/paper: show link to latest file revision (issue1344)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 9426
diff changeset
36 <li><a href="/file/tip/primes.py">latest</a></li>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
37 <li><a href="/diff/853dcd4de2a6/primes.py">diff</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
38 <li><a href="/annotate/853dcd4de2a6/primes.py">annotate</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
39 <li><a href="/log/853dcd4de2a6/primes.py">file log</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
40 <li><a href="/raw-file/853dcd4de2a6/primes.py">raw</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
41 </ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
42 </div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
43
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
44 <div class="main">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
45 <h2><a href="/">test</a></h2>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
46 <h3>view primes.py @ 0:853dcd4de2a6</h3>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
47
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
48 <form class="search" action="/log">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
49
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
50 <p><input name="rev" id="search1" type="text" size="30" /></p>
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
51 <div id="hint">find changesets by author, revision,
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
52 files, or words in the commit message</div>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
53 </form>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
54
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
55 <div class="description">a</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
56
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
57 <table id="changesetEntry">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
58 <tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
59 <th class="author">author</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
60 <td class="author">&#116;&#101;&#115;&#116;</td>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
61 </tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
62 <tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
63 <th class="date">date</th>
9722
4d9dea174b84 templater: readable dates older than 24 months revert to ISO8601 (issue1006)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 9720
diff changeset
64 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
65 </tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
66 <tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
67 <th class="author">parents</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
68 <td class="author"></td>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
69 </tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
70 <tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
71 <th class="author">children</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
72 <td class="author"></td>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
73 </tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
74
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
75 </table>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
76
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
77 <div class="overflow">
7395
e2048f5c7bf5 tests: fix tests broken by 03b60f2f90bf
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 7347
diff changeset
78 <div class="sourcefirst"> line source</div>
8486
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
79
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
80 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> <span class="c">#!/usr/bin/env python</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
81 <div class="parity1 source"><a href="#l2" id="l2"> 2</a> </div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
82 <div class="parity0 source"><a href="#l3" id="l3"> 3</a> <span class="sd">&quot;&quot;&quot;Fun with generators. Corresponding Haskell implementation:</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
83 <div class="parity1 source"><a href="#l4" id="l4"> 4</a> </div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
84 <div class="parity0 source"><a href="#l5" id="l5"> 5</a> <span class="sd">primes = 2 : sieve [3, 5..]</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
85 <div class="parity1 source"><a href="#l6" id="l6"> 6</a> <span class="sd"> where sieve (p:ns) = p : sieve [n | n &lt;- ns, mod n p /= 0]</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
86 <div class="parity0 source"><a href="#l7" id="l7"> 7</a> <span class="sd">&quot;&quot;&quot;</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
87 <div class="parity1 source"><a href="#l8" id="l8"> 8</a> </div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
88 <div class="parity0 source"><a href="#l9" id="l9"> 9</a> <span class="kn">from</span> <span class="nn">itertools</span> <span class="kn">import</span> <span class="n">dropwhile</span><span class="p">,</span> <span class="n">ifilter</span><span class="p">,</span> <span class="n">islice</span><span class="p">,</span> <span class="n">count</span><span class="p">,</span> <span class="n">chain</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
89 <div class="parity1 source"><a href="#l10" id="l10"> 10</a> </div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
90 <div class="parity0 source"><a href="#l11" id="l11"> 11</a> <span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
91 <div class="parity1 source"><a href="#l12" id="l12"> 12</a> <span class="sd">&quot;&quot;&quot;Generate all primes.&quot;&quot;&quot;</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
92 <div class="parity0 source"><a href="#l13" id="l13"> 13</a> <span class="kn">def</span> <span class="nf">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
93 <div class="parity1 source"><a href="#l14" id="l14"> 14</a> <span class="n">p</span> <span class="o">=</span> <span class="n">ns</span><span class="o">.</span><span class="n">next</span><span class="p">()</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
94 <div class="parity0 source"><a href="#l15" id="l15"> 15</a> <span class="c"># It is important to yield *here* in order to stop the</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
95 <div class="parity1 source"><a href="#l16" id="l16"> 16</a> <span class="c"># infinite recursion.</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
96 <div class="parity0 source"><a href="#l17" id="l17"> 17</a> <span class="kn">yield</span> <span class="n">p</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
97 <div class="parity1 source"><a href="#l18" id="l18"> 18</a> <span class="n">ns</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">%</span> <span class="n">p</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">ns</span><span class="p">)</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
98 <div class="parity0 source"><a href="#l19" id="l19"> 19</a> <span class="kn">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="n">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
99 <div class="parity1 source"><a href="#l20" id="l20"> 20</a> <span class="kn">yield</span> <span class="n">n</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
100 <div class="parity0 source"><a href="#l21" id="l21"> 21</a> </div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
101 <div class="parity1 source"><a href="#l22" id="l22"> 22</a> <span class="n">odds</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">i</span><span class="p">:</span> <span class="n">i</span> <span class="o">%</span> <span class="mi">2</span> <span class="o">==</span> <span class="mi">1</span><span class="p">,</span> <span class="n">count</span><span class="p">())</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
102 <div class="parity0 source"><a href="#l23" id="l23"> 23</a> <span class="kn">return</span> <span class="n">chain</span><span class="p">([</span><span class="mi">2</span><span class="p">],</span> <span class="n">sieve</span><span class="p">(</span><span class="n">dropwhile</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">&lt;</span> <span class="mi">3</span><span class="p">,</span> <span class="n">odds</span><span class="p">)))</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
103 <div class="parity1 source"><a href="#l24" id="l24"> 24</a> </div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
104 <div class="parity0 source"><a href="#l25" id="l25"> 25</a> <span class="kn">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">&quot;__main__&quot;</span><span class="p">:</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
105 <div class="parity1 source"><a href="#l26" id="l26"> 26</a> <span class="kn">import</span> <span class="nn">sys</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
106 <div class="parity0 source"><a href="#l27" id="l27"> 27</a> <span class="kn">try</span><span class="p">:</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
107 <div class="parity1 source"><a href="#l28" id="l28"> 28</a> <span class="n">n</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
108 <div class="parity0 source"><a href="#l29" id="l29"> 29</a> <span class="kn">except</span> <span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="ne">IndexError</span><span class="p">):</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
109 <div class="parity1 source"><a href="#l30" id="l30"> 30</a> <span class="n">n</span> <span class="o">=</span> <span class="mi">10</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
110 <div class="parity0 source"><a href="#l31" id="l31"> 31</a> <span class="n">p</span> <span class="o">=</span> <span class="n">primes</span><span class="p">()</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
111 <div class="parity1 source"><a href="#l32" id="l32"> 32</a> <span class="kn">print</span> <span class="s">&quot;The first </span><span class="si">%d</span><span class="s"> primes: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="nb">list</span><span class="p">(</span><span class="n">islice</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">n</span><span class="p">)))</span></div>
7395
e2048f5c7bf5 tests: fix tests broken by 03b60f2f90bf
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 7347
diff changeset
112 <div class="sourcelast"></div>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
113 </div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
114 </div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
115 </div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
116
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
117
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
118
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
119 </body>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
120 </html>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
121
6987
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
122 % hgweb fileannotate, html
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
123 200 Script output follows
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
124
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
125 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
126 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
127 <head>
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
128 <link rel="icon" href="/static/hgicon.png" type="image/png" />
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
129 <meta name="robots" content="index, nofollow" />
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
130 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
131
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
132 <link rel="stylesheet" href="/highlightcss" type="text/css" />
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
133 <title>test: primes.py annotate</title>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
134 </head>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
135 <body>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
136
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
137 <div class="container">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
138 <div class="menu">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
139 <div class="logo">
8936
1de6e7e1bb9f change wiki/bts URLs to point to new hostname
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8504
diff changeset
140 <a href="http://mercurial.selenic.com/">
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
141 <img src="/static/hglogo.png" alt="mercurial" /></a>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
142 </div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
143 <ul>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
144 <li><a href="/shortlog/853dcd4de2a6">log</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
145 <li><a href="/graph/853dcd4de2a6">graph</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
146 <li><a href="/tags">tags</a></li>
8353
6058d291abdf paper/coal: add branches page
Sune Foldager <cryo@cyanite.org>
parents: 8083
diff changeset
147 <li><a href="/branches">branches</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
148 </ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
149
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
150 <ul>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
151 <li><a href="/rev/853dcd4de2a6">changeset</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
152 <li><a href="/file/853dcd4de2a6/">browse</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
153 </ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
154 <ul>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
155 <li><a href="/file/853dcd4de2a6/primes.py">file</a></li>
9720
bb00a159e594 coal/paper: show link to latest file revision (issue1344)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 9426
diff changeset
156 <li><a href="/file/tip/primes.py">latest</a></li>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
157 <li><a href="/diff/853dcd4de2a6/primes.py">diff</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
158 <li class="active">annotate</li>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
159 <li><a href="/log/853dcd4de2a6/primes.py">file log</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
160 <li><a href="/raw-annotate/853dcd4de2a6/primes.py">raw</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
161 </ul>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
162 </div>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
163
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
164 <div class="main">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
165 <h2><a href="/">test</a></h2>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
166 <h3>annotate primes.py @ 0:853dcd4de2a6</h3>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
167
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
168 <form class="search" action="/log">
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
169
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
170 <p><input name="rev" id="search1" type="text" size="30" /></p>
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
171 <div id="hint">find changesets by author, revision,
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
172 files, or words in the commit message</div>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
173 </form>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
174
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
175 <div class="description">a</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
176
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
177 <table id="changesetEntry">
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
178 <tr>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
179 <th class="author">author</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
180 <td class="author">&#116;&#101;&#115;&#116;</td>
6907
6dcbe191a9b5 Fix up tests
Matt Mackall <mpm@selenic.com>
parents: 6695
diff changeset
181 </tr>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
182 <tr>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
183 <th class="date">date</th>
9722
4d9dea174b84 templater: readable dates older than 24 months revert to ISO8601 (issue1006)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 9720
diff changeset
184 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td>
6907
6dcbe191a9b5 Fix up tests
Matt Mackall <mpm@selenic.com>
parents: 6695
diff changeset
185 </tr>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
186 <tr>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
187 <th class="author">parents</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
188 <td class="author"></td>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
189 </tr>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
190 <tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
191 <th class="author">children</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
192 <td class="author"></td>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
193 </tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
194
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
195 </table>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
196
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
197 <div class="overflow">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
198 <table class="bigtable">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
199 <tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
200 <th class="annotate">rev</th>
7395
e2048f5c7bf5 tests: fix tests broken by 03b60f2f90bf
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 7347
diff changeset
201 <th class="line">&nbsp;&nbsp;line source</th>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
202 </tr>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
203
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
204 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
205 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
206 <a href="/annotate/853dcd4de2a6/primes.py#1"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
207 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
208 </td>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
209 <td class="source"><a href="#l1" id="l1"> 1</a> <span class="c">#!/usr/bin/env python</span></td>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
210 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
211 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
212 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
213 <a href="/annotate/853dcd4de2a6/primes.py#2"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
214 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
215 </td>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
216 <td class="source"><a href="#l2" id="l2"> 2</a> </td>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
217 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
218 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
219 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
220 <a href="/annotate/853dcd4de2a6/primes.py#3"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
221 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
222 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
223 <td class="source"><a href="#l3" id="l3"> 3</a> <span class="sd">&quot;&quot;&quot;Fun with generators. Corresponding Haskell implementation:</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
224 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
225 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
226 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
227 <a href="/annotate/853dcd4de2a6/primes.py#4"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
228 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
229 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
230 <td class="source"><a href="#l4" id="l4"> 4</a> </td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
231 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
232 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
233 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
234 <a href="/annotate/853dcd4de2a6/primes.py#5"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
235 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
236 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
237 <td class="source"><a href="#l5" id="l5"> 5</a> <span class="sd">primes = 2 : sieve [3, 5..]</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
238 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
239 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
240 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
241 <a href="/annotate/853dcd4de2a6/primes.py#6"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
242 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
243 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
244 <td class="source"><a href="#l6" id="l6"> 6</a> <span class="sd"> where sieve (p:ns) = p : sieve [n | n &lt;- ns, mod n p /= 0]</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
245 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
246 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
247 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
248 <a href="/annotate/853dcd4de2a6/primes.py#7"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
249 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
250 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
251 <td class="source"><a href="#l7" id="l7"> 7</a> <span class="sd">&quot;&quot;&quot;</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
252 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
253 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
254 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
255 <a href="/annotate/853dcd4de2a6/primes.py#8"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
256 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
257 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
258 <td class="source"><a href="#l8" id="l8"> 8</a> </td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
259 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
260 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
261 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
262 <a href="/annotate/853dcd4de2a6/primes.py#9"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
263 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
264 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
265 <td class="source"><a href="#l9" id="l9"> 9</a> <span class="kn">from</span> <span class="nn">itertools</span> <span class="kn">import</span> <span class="n">dropwhile</span><span class="p">,</span> <span class="n">ifilter</span><span class="p">,</span> <span class="n">islice</span><span class="p">,</span> <span class="n">count</span><span class="p">,</span> <span class="n">chain</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
266 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
267 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
268 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
269 <a href="/annotate/853dcd4de2a6/primes.py#10"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
270 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
271 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
272 <td class="source"><a href="#l10" id="l10"> 10</a> </td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
273 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
274 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
275 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
276 <a href="/annotate/853dcd4de2a6/primes.py#11"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
277 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
278 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
279 <td class="source"><a href="#l11" id="l11"> 11</a> <span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
280 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
281 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
282 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
283 <a href="/annotate/853dcd4de2a6/primes.py#12"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
284 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
285 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
286 <td class="source"><a href="#l12" id="l12"> 12</a> <span class="sd">&quot;&quot;&quot;Generate all primes.&quot;&quot;&quot;</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
287 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
288 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
289 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
290 <a href="/annotate/853dcd4de2a6/primes.py#13"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
291 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
292 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
293 <td class="source"><a href="#l13" id="l13"> 13</a> <span class="kn">def</span> <span class="nf">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
294 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
295 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
296 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
297 <a href="/annotate/853dcd4de2a6/primes.py#14"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
298 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
299 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
300 <td class="source"><a href="#l14" id="l14"> 14</a> <span class="n">p</span> <span class="o">=</span> <span class="n">ns</span><span class="o">.</span><span class="n">next</span><span class="p">()</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
301 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
302 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
303 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
304 <a href="/annotate/853dcd4de2a6/primes.py#15"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
305 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
306 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
307 <td class="source"><a href="#l15" id="l15"> 15</a> <span class="c"># It is important to yield *here* in order to stop the</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
308 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
309 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
310 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
311 <a href="/annotate/853dcd4de2a6/primes.py#16"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
312 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
313 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
314 <td class="source"><a href="#l16" id="l16"> 16</a> <span class="c"># infinite recursion.</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
315 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
316 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
317 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
318 <a href="/annotate/853dcd4de2a6/primes.py#17"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
319 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
320 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
321 <td class="source"><a href="#l17" id="l17"> 17</a> <span class="kn">yield</span> <span class="n">p</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
322 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
323 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
324 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
325 <a href="/annotate/853dcd4de2a6/primes.py#18"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
326 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
327 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
328 <td class="source"><a href="#l18" id="l18"> 18</a> <span class="n">ns</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">%</span> <span class="n">p</span> <span class="o">!=</span> <span class="mf">0</span><span class="p">,</span> <span class="n">ns</span><span class="p">)</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
329 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
330 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
331 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
332 <a href="/annotate/853dcd4de2a6/primes.py#19"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
333 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
334 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
335 <td class="source"><a href="#l19" id="l19"> 19</a> <span class="kn">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="n">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
336 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
337 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
338 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
339 <a href="/annotate/853dcd4de2a6/primes.py#20"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
340 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
341 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
342 <td class="source"><a href="#l20" id="l20"> 20</a> <span class="kn">yield</span> <span class="n">n</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
343 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
344 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
345 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
346 <a href="/annotate/853dcd4de2a6/primes.py#21"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
347 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
348 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
349 <td class="source"><a href="#l21" id="l21"> 21</a> </td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
350 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
351 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
352 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
353 <a href="/annotate/853dcd4de2a6/primes.py#22"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
354 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
355 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
356 <td class="source"><a href="#l22" id="l22"> 22</a> <span class="n">odds</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">i</span><span class="p">:</span> <span class="n">i</span> <span class="o">%</span> <span class="mf">2</span> <span class="o">==</span> <span class="mf">1</span><span class="p">,</span> <span class="n">count</span><span class="p">())</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
357 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
358 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
359 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
360 <a href="/annotate/853dcd4de2a6/primes.py#23"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
361 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
362 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
363 <td class="source"><a href="#l23" id="l23"> 23</a> <span class="kn">return</span> <span class="n">chain</span><span class="p">([</span><span class="mf">2</span><span class="p">],</span> <span class="n">sieve</span><span class="p">(</span><span class="n">dropwhile</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">&lt;</span> <span class="mf">3</span><span class="p">,</span> <span class="n">odds</span><span class="p">)))</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
364 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
365 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
366 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
367 <a href="/annotate/853dcd4de2a6/primes.py#24"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
368 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
369 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
370 <td class="source"><a href="#l24" id="l24"> 24</a> </td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
371 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
372 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
373 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
374 <a href="/annotate/853dcd4de2a6/primes.py#25"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
375 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
376 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
377 <td class="source"><a href="#l25" id="l25"> 25</a> <span class="kn">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">&quot;__main__&quot;</span><span class="p">:</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
378 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
379 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
380 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
381 <a href="/annotate/853dcd4de2a6/primes.py#26"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
382 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
383 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
384 <td class="source"><a href="#l26" id="l26"> 26</a> <span class="kn">import</span> <span class="nn">sys</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
385 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
386 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
387 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
388 <a href="/annotate/853dcd4de2a6/primes.py#27"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
389 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
390 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
391 <td class="source"><a href="#l27" id="l27"> 27</a> <span class="kn">try</span><span class="p">:</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
392 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
393 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
394 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
395 <a href="/annotate/853dcd4de2a6/primes.py#28"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
396 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
397 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
398 <td class="source"><a href="#l28" id="l28"> 28</a> <span class="n">n</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">1</span><span class="p">])</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
399 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
400 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
401 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
402 <a href="/annotate/853dcd4de2a6/primes.py#29"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
403 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
404 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
405 <td class="source"><a href="#l29" id="l29"> 29</a> <span class="kn">except</span> <span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="ne">IndexError</span><span class="p">):</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
406 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
407 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
408 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
409 <a href="/annotate/853dcd4de2a6/primes.py#30"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
410 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
411 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
412 <td class="source"><a href="#l30" id="l30"> 30</a> <span class="n">n</span> <span class="o">=</span> <span class="mf">10</span></td>
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
413 </tr>
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
414 <tr class="parity0">
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
415 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
416 <a href="/annotate/853dcd4de2a6/primes.py#31"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
417 title="853dcd4de2a6: a">test@0</a>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
418 </td>
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
419 <td class="source"><a href="#l31" id="l31"> 31</a> <span class="n">p</span> <span class="o">=</span> <span class="n">primes</span><span class="p">()</span></td>
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
420 </tr>
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
421 <tr class="parity1">
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
422 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
423 <a href="/annotate/853dcd4de2a6/primes.py#32"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
424 title="853dcd4de2a6: a">test@0</a>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
425 </td>
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
426 <td class="source"><a href="#l32" id="l32"> 32</a> <span class="kn">print</span> <span class="s">&quot;The first </span><span class="si">%d</span><span class="s"> primes: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="nb">list</span><span class="p">(</span><span class="n">islice</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">n</span><span class="p">)))</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
427 </tr>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
428 </table>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
429 </div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
430 </div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
431 </div>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
432
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
433
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
434
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
435 </body>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
436 </html>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
437
6987
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
438 % hgweb fileannotate, raw
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
439
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
440 % hgweb filerevision, raw
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
441
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
442 % hgweb highlightcss friendly
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
443 200 Script output follows
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
444
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
445 /* pygments_style = friendly */
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
446
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
447 % errors encountered
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
448 % hg serve again
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
449 % hgweb highlightcss fruity
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
450 200 Script output follows
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
451
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
452 /* pygments_style = fruity */
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
453
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
454 % errors encountered
9424
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
455 adding eucjp.txt
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
456 % HGENCODING=euc-jp hg serve
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
457 % hgweb filerevision, html
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
458 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> \xb5\xfe</div>
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
459 % errors encountered
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
460 % HGENCODING=utf-8 hg serve
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
461 % hgweb filerevision, html
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
462 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> \xef\xbf\xbd\xef\xbf\xbd</div>
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
463 % errors encountered
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
464 % HGENCODING=us-ascii hg serve
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
465 % hgweb filerevision, html
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
466 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> ??</div>
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
467 % errors encountered