Mercurial > hg
changeset 8217:d895158fe8af
tests: add tests for styled hgwebdir pages
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Mon, 27 Apr 2009 11:35:18 +0200 |
parents | 25266fe996b0 |
children | e61cb2813d2a |
files | tests/test-hgwebdir tests/test-hgwebdir.out |
diffstat | 2 files changed, 92 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-hgwebdir Mon Apr 27 11:37:30 2009 +0200 +++ b/tests/test-hgwebdir Mon Apr 27 11:35:18 2009 +0200 @@ -64,8 +64,12 @@ echo % should succeed, slashy names "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw' +"$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=paper' \ + | sed -r "s/[0-9]+ seconds? ago/seconds ago/" "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t?style=raw' "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw' +"$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=paper' \ + | sed -r "s/[0-9]+ seconds? ago/seconds ago/" "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a?style=atom' \ | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a/?style=atom' \
--- a/tests/test-hgwebdir.out Mon Apr 27 11:37:30 2009 +0200 +++ b/tests/test-hgwebdir.out Mon Apr 27 11:35:18 2009 +0200 @@ -43,6 +43,55 @@ 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" /> + +<title>Mercurial repositories index</title> +</head> +<body> + +<div class="container"> +<div class="menu"> +<a href="http://www.selenic.com/mercurial/"> +<img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> +</div> +<div class="main"> +<h2>Mercurial Repositories</h2> + +<table class="bigtable"> + <tr> + <th><a href="?sort=-name">Name</a></th> + <th><a href="?sort=description">Description</a></th> + <th><a href="?sort=contact">Contact</a></th> + <th><a href="?sort=lastchange">Last change</a></th> + <th> </th> + </tr> + <tr class="parity0"><td><a href="/b/?style=paper">b</a></td><td>unknown</td><td>Foo Bar <foo.bar@example.com></td><td class="age">seconds ago</td><td class="indexlinks"></td></tr> +<tr class="parity1"><td><a href="/coll/a/?style=paper">coll/a</a></td><td>unknown</td><td>Foo Bar <foo.bar@example.com></td><td class="age">seconds ago</td><td class="indexlinks"></td></tr> +<tr class="parity0"><td><a href="/coll/a/.hg/patches/?style=paper">coll/a/.hg/patches</a></td><td>unknown</td><td>Foo Bar <foo.bar@example.com></td><td class="age">seconds ago</td><td class="indexlinks"></td></tr> +<tr class="parity1"><td><a href="/coll/b/?style=paper">coll/b</a></td><td>unknown</td><td>Foo Bar <foo.bar@example.com></td><td class="age">seconds ago</td><td class="indexlinks"></td></tr> +<tr class="parity0"><td><a href="/coll/c/?style=paper">coll/c</a></td><td>unknown</td><td>Foo Bar <foo.bar@example.com></td><td class="age">seconds ago</td><td class="indexlinks"></td></tr> +<tr class="parity1"><td><a href="/rcoll/a/?style=paper">rcoll/a</a></td><td>unknown</td><td>Foo Bar <foo.bar@example.com></td><td class="age">seconds ago</td><td class="indexlinks"></td></tr> +<tr class="parity0"><td><a href="/rcoll/a/.hg/patches/?style=paper">rcoll/a/.hg/patches</a></td><td>unknown</td><td>Foo Bar <foo.bar@example.com></td><td class="age">seconds ago</td><td class="indexlinks"></td></tr> +<tr class="parity1"><td><a href="/rcoll/b/?style=paper">rcoll/b</a></td><td>unknown</td><td>Foo Bar <foo.bar@example.com></td><td class="age">seconds ago</td><td class="indexlinks"></td></tr> +<tr class="parity0"><td><a href="/rcoll/b/d/?style=paper">rcoll/b/d</a></td><td>unknown</td><td>Foo Bar <foo.bar@example.com></td><td class="age">seconds ago</td><td class="indexlinks"></td></tr> +<tr class="parity1"><td><a href="/rcoll/c/?style=paper">rcoll/c</a></td><td>unknown</td><td>Foo Bar <foo.bar@example.com></td><td class="age">seconds ago</td><td class="indexlinks"></td></tr> +<tr class="parity0"><td><a href="/t/a/?style=paper">t/a</a></td><td>unknown</td><td>Foo Bar <foo.bar@example.com></td><td class="age">seconds ago</td><td class="indexlinks"></td></tr> + +</table> +</div> +</div> + + +</body> +</html> + +200 Script output follows + /t/a/ @@ -53,6 +102,45 @@ 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" /> + +<title>Mercurial repositories index</title> +</head> +<body> + +<div class="container"> +<div class="menu"> +<a href="http://www.selenic.com/mercurial/"> +<img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> +</div> +<div class="main"> +<h2>Mercurial Repositories</h2> + +<table class="bigtable"> + <tr> + <th><a href="?sort=-name">Name</a></th> + <th><a href="?sort=description">Description</a></th> + <th><a href="?sort=contact">Contact</a></th> + <th><a href="?sort=lastchange">Last change</a></th> + <th> </th> + </tr> + <tr class="parity0"><td><a href="/t/a/?style=paper">a</a></td><td>unknown</td><td>Foo Bar <foo.bar@example.com></td><td class="age">seconds ago</td><td class="indexlinks"></td></tr> + +</table> +</div> +</div> + + +</body> +</html> + +200 Script output follows + <?xml version="1.0" encoding="ascii"?> <feed xmlns="http://127.0.0.1/2005/Atom"> <!-- Changelog -->