##// END OF EJS Templates
tests: add coverage for some untested areas of hgweb...
Matt Harbison -
r40418:bd1ec1e3 default
parent child Browse files
Show More
@@ -55,4 +55,171 b' Test raw style of hgweb'
55 55 $ cat access.log error.log
56 56 $LOCALIP - - [$LOGDATE$] "GET /raw-file/bf0ff59095c9/sub/some%20text%25.txt HTTP/1.1" 200 - (glob)
57 57
58 >>> with open('sub/binary.bin', 'wb') as fp:
59 ... fp.write(b'Binary\0file') and None
60
61 $ hg ci -Aqm "add binary file" sub/
62 $ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid \
63 > --config web.guessmime=True
64 $ cat hg.pid >> $DAEMON_PIDS
65 $ (get-with-headers.py localhost:$HGPORT 'annotate/tip/sub/binary.bin' content-type content-length content-disposition) >getoutput.txt
66 $ cat getoutput.txt
67 200 Script output follows
68 content-type: text/html; charset=ascii
69
70 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
71 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
72 <head>
73 <link rel="icon" href="/static/hgicon.png" type="image/png" />
74 <meta name="robots" content="index, nofollow" />
75 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
76 <script type="text/javascript" src="/static/mercurial.js"></script>
77
78 <title>$TESTTMP/test: sub/binary.bin annotate</title> (glob)
79 </head>
80 <body>
81
82 <div class="container">
83 <div class="menu">
84 <div class="logo">
85 <a href="https://mercurial-scm.org/">
86 <img src="/static/hglogo.png" alt="mercurial" /></a>
87 </div>
88 <ul>
89 <li><a href="/shortlog/tip">log</a></li>
90 <li><a href="/graph/tip">graph</a></li>
91 <li><a href="/tags">tags</a></li>
92 <li><a href="/bookmarks">bookmarks</a></li>
93 <li><a href="/branches">branches</a></li>
94 </ul>
95
96 <ul>
97 <li><a href="/rev/tip">changeset</a></li>
98 <li><a href="/file/tip/sub/">browse</a></li>
99 </ul>
100 <ul>
101 <li><a href="/file/tip/sub/binary.bin">file</a></li>
102 <li><a href="/file/tip/sub/binary.bin">latest</a></li>
103 <li><a href="/diff/tip/sub/binary.bin">diff</a></li>
104 <li><a href="/comparison/tip/sub/binary.bin">comparison</a></li>
105 <li class="active">annotate</li>
106 <li><a href="/log/tip/sub/binary.bin">file log</a></li>
107 <li><a href="/raw-file/tip/sub/binary.bin">raw</a></li>
108 </ul>
109 <ul>
110 <li><a href="/help">help</a></li>
111 </ul>
112 </div>
113
114 <div class="main">
115 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
116 <h3>
117 annotate sub/binary.bin @ 1:<a href="/rev/7dc31308464a">7dc31308464a</a>
118 <span class="phase">draft</span> <span class="branchhead">default</span> <span class="tag">tip</span>
119 </h3>
120
121
122 <form class="search" action="/log">
123
124 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
125 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
126 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
127 </form>
128
129 <div class="description">add binary file</div>
130
131 <table id="changesetEntry">
132 <tr>
133 <th class="author">author</th>
134 <td class="author">&#116;&#101;&#115;&#116;</td>
135 </tr>
136 <tr>
137 <th class="date">date</th>
138 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
139 </tr>
140 <tr>
141 <th class="author">parents</th>
142 <td class="author"></td>
143 </tr>
144 <tr>
145 <th class="author">children</th>
146 <td class="author"></td>
147 </tr>
148 </table>
149
150
151 <form id="diffopts-form"
152 data-ignorews="0"
153 data-ignorewsamount="0"
154 data-ignorewseol="0"
155 data-ignoreblanklines="0">
156 <span>Ignore whitespace changes - </span>
157 <span>Everywhere:</span>
158 <input id="ignorews-checkbox" type="checkbox" />
159 <span>Within whitespace:</span>
160 <input id="ignorewsamount-checkbox" type="checkbox" />
161 <span>At end of lines:</span>
162 <input id="ignorewseol-checkbox" type="checkbox" />
163 </form>
164
165 <script type="text/javascript">
166 renderDiffOptsForm();
167 </script>
168
169 <div class="overflow">
170 <table class="bigtable">
171 <thead>
172 <tr>
173 <th class="annotate">rev</th>
174 <th class="line">&nbsp;&nbsp;line source</th>
175 </tr>
176 </thead>
177 <tbody class="stripes2 sourcelines"
178 data-logurl="/log/tip/sub/binary.bin"
179 data-selectabletag="TR"
180 data-ishead="1">
181
182 <tr id="l1" class="thisrev">
183 <td class="annotate parity0">
184 <a href="/annotate/7dc31308464a/sub/binary.bin#l1">
185 1
186 </a>
187 <div class="annotate-info">
188 <div>
189 <a href="/annotate/7dc31308464a/sub/binary.bin#l1">
190 7dc31308464a</a>
191 add binary file
192 </div>
193 <div><em>&#116;&#101;&#115;&#116;</em></div>
194 <div>parents: </div>
195 <a href="/diff/7dc31308464a/sub/binary.bin">diff</a>
196 <a href="/rev/7dc31308464a">changeset</a>
197 </div>
198 </td>
199 <td class="source followlines-btn-parent"><a href="#l1"> 1</a> (binary:application/octet-stream)</td>
200 </tr>
201 </tbody>
202 </table>
203 </div>
204 </div>
205 </div>
206
207 <script type="text/javascript" src="/static/followlines.js"></script>
208
209
210
211 </body>
212 </html>
213
214 $ (get-with-headers.py localhost:$HGPORT 'comparison/tip/sub/binary.bin' content-type content-length content-disposition) >getoutput.txt
215 $ (get-with-headers.py localhost:$HGPORT 'file/tip/sub/binary.bin' content-type content-length content-disposition) >getoutput.txt
216 $ (get-with-headers.py localhost:$HGPORT 'static/hgicon.png' content-type content-length content-disposition) >getoutput.txt
217 $ killdaemons.py hg.pid
218 $ cat access.log error.log
219 $LOCALIP - - [$LOGDATE$] "GET /raw-file/bf0ff59095c9/sub/some%20text%25.txt HTTP/1.1" 200 - (glob)
220 $LOCALIP - - [$LOGDATE$] "GET /annotate/tip/sub/binary.bin HTTP/1.1" 200 - (glob)
221 $LOCALIP - - [$LOGDATE$] "GET /comparison/tip/sub/binary.bin HTTP/1.1" 200 - (glob)
222 $LOCALIP - - [$LOGDATE$] "GET /file/tip/sub/binary.bin HTTP/1.1" 200 - (glob)
223 $LOCALIP - - [$LOGDATE$] "GET /static/hgicon.png HTTP/1.1" 200 - (glob)
224
58 225 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now