Mercurial > hg
changeset 21484:96cdf2e3dbef
tests: tests for the rss feeds
This matches the existing tests for the atom feeds.
author | Steven Brown <StevenGBrown@gmail.com> |
---|---|
date | Sat, 17 May 2014 17:09:10 +0800 |
parents | 6adfc311eee8 |
children | ec273709c49e |
files | tests/test-hgweb-commands.t |
diffstat | 1 files changed, 289 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-hgweb-commands.t Wed Apr 23 15:54:26 2014 -0500 +++ b/tests/test-hgweb-commands.t Sat May 17 17:09:10 2014 +0800 @@ -235,6 +235,180 @@ </entry> </feed> + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/?style=rss' + 200 Script output follows + + <?xml version="1.0" encoding="ascii"?> + <rss version="2.0"> + <channel> + <link>http://*:$HGPORT/</link> (glob) + <language>en-us</language> + + <title>test Changelog</title> + <description>test Changelog</description> + <item> + <title>[unstable] branch commit with null character: </title> + <guid isPermaLink="true">http://*:$HGPORT/rev/cad8025a2e87</guid> (glob) + <link>http://*:$HGPORT/rev/cad8025a2e87</link> (glob) + <description> + <![CDATA[ + <table> + <tr> + <th style="text-align:left;">changeset</th> + <td>cad8025a2e87</td> + </tr> + <tr> + <th style="text-align:left;">branch</th> + <td>unstable</td> + </tr> + <tr> + <th style="text-align:left;">bookmark</th> + <td>something</td> + </tr> + <tr> + <th style="text-align:left;">tag</th> + <td>tip</td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">user</th> + <td>test</td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">description</th> + <td>branch commit with null character: </td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">files</th> + <td></td> + </tr> + </table> + ]]></description> + <author>test</author> + <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> + </item> + <item> + <title>[stable] branch</title> + <guid isPermaLink="true">http://*:$HGPORT/rev/1d22e65f027e</guid> (glob) + <link>http://*:$HGPORT/rev/1d22e65f027e</link> (glob) + <description> + <![CDATA[ + <table> + <tr> + <th style="text-align:left;">changeset</th> + <td>1d22e65f027e</td> + </tr> + <tr> + <th style="text-align:left;">branch</th> + <td>stable</td> + </tr> + <tr> + <th style="text-align:left;">bookmark</th> + <td></td> + </tr> + <tr> + <th style="text-align:left;">tag</th> + <td></td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">user</th> + <td>test</td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">description</th> + <td>branch</td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">files</th> + <td>foo<br /></td> + </tr> + </table> + ]]></description> + <author>test</author> + <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> + </item> + <item> + <title>[default] Added tag 1.0 for changeset 2ef0ac749a14</title> + <guid isPermaLink="true">http://*:$HGPORT/rev/a4f92ed23982</guid> (glob) + <link>http://*:$HGPORT/rev/a4f92ed23982</link> (glob) + <description> + <![CDATA[ + <table> + <tr> + <th style="text-align:left;">changeset</th> + <td>a4f92ed23982</td> + </tr> + <tr> + <th style="text-align:left;">branch</th> + <td>default</td> + </tr> + <tr> + <th style="text-align:left;">bookmark</th> + <td></td> + </tr> + <tr> + <th style="text-align:left;">tag</th> + <td></td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">user</th> + <td>test</td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">description</th> + <td>Added tag 1.0 for changeset 2ef0ac749a14</td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">files</th> + <td>.hgtags<br /></td> + </tr> + </table> + ]]></description> + <author>test</author> + <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> + </item> + <item> + <title>base</title> + <guid isPermaLink="true">http://*:$HGPORT/rev/2ef0ac749a14</guid> (glob) + <link>http://*:$HGPORT/rev/2ef0ac749a14</link> (glob) + <description> + <![CDATA[ + <table> + <tr> + <th style="text-align:left;">changeset</th> + <td>2ef0ac749a14</td> + </tr> + <tr> + <th style="text-align:left;">branch</th> + <td></td> + </tr> + <tr> + <th style="text-align:left;">bookmark</th> + <td>anotherthing</td> + </tr> + <tr> + <th style="text-align:left;">tag</th> + <td>1.0</td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">user</th> + <td>test</td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">description</th> + <td>base</td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">files</th> + <td>da/foo<br />foo<br /></td> + </tr> + </table> + ]]></description> + <author>test</author> + <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> + </item> + + </channel> + </rss> (no-eol) $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/1/?style=atom' 200 Script output follows @@ -335,6 +509,100 @@ </entry> </feed> + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/1/?style=rss' + 200 Script output follows + + <?xml version="1.0" encoding="ascii"?> + <rss version="2.0"> + <channel> + <link>http://*:$HGPORT/</link> (glob) + <language>en-us</language> + + <title>test Changelog</title> + <description>test Changelog</description> + <item> + <title>[default] Added tag 1.0 for changeset 2ef0ac749a14</title> + <guid isPermaLink="true">http://*:$HGPORT/rev/a4f92ed23982</guid> (glob) + <link>http://*:$HGPORT/rev/a4f92ed23982</link> (glob) + <description> + <![CDATA[ + <table> + <tr> + <th style="text-align:left;">changeset</th> + <td>a4f92ed23982</td> + </tr> + <tr> + <th style="text-align:left;">branch</th> + <td>default</td> + </tr> + <tr> + <th style="text-align:left;">bookmark</th> + <td></td> + </tr> + <tr> + <th style="text-align:left;">tag</th> + <td></td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">user</th> + <td>test</td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">description</th> + <td>Added tag 1.0 for changeset 2ef0ac749a14</td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">files</th> + <td>.hgtags<br /></td> + </tr> + </table> + ]]></description> + <author>test</author> + <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> + </item> + <item> + <title>base</title> + <guid isPermaLink="true">http://*:$HGPORT/rev/2ef0ac749a14</guid> (glob) + <link>http://*:$HGPORT/rev/2ef0ac749a14</link> (glob) + <description> + <![CDATA[ + <table> + <tr> + <th style="text-align:left;">changeset</th> + <td>2ef0ac749a14</td> + </tr> + <tr> + <th style="text-align:left;">branch</th> + <td></td> + </tr> + <tr> + <th style="text-align:left;">bookmark</th> + <td>anotherthing</td> + </tr> + <tr> + <th style="text-align:left;">tag</th> + <td>1.0</td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">user</th> + <td>test</td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">description</th> + <td>base</td> + </tr> + <tr> + <th style="text-align:left;vertical-align:top;">files</th> + <td>da/foo<br />foo<br /></td> + </tr> + </table> + ]]></description> + <author>test</author> + <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> + </item> + + </channel> + </rss> (no-eol) $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/1/foo/?style=atom' 200 Script output follows @@ -390,6 +658,27 @@ </entry> </feed> + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/1/foo/?style=rss' + 200 Script output follows + + <?xml version="1.0" encoding="ascii"?> + <rss version="2.0"> + <channel> + <link>http://*:$HGPORT/</link> (glob) + <language>en-us</language> + + <title>test: foo history</title> + <description>foo revision history</description> + <item> + <title>base</title> + <link>http://*:$HGPORT/log2ef0ac749a14/foo</link> (glob) + <description><![CDATA[base]]></description> + <author>test</author> + <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> + </item> + + </channel> + </rss> $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'shortlog/' 200 Script output follows