summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2006-11-29 13:04:40 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2006-11-29 13:04:40 +0000
commitcfd93dabc085eaff9e9a110aaeff3c395945b07f (patch)
tree9bcb050cfaeb691afe07081b21d0f6bc21d4041e /test
parente4483eb452b7108e0a38f46335c5800e0486a4f9 (diff)
Convert docstrings (that need formatting) to XHTML
Diffstat (limited to 'test')
-rw-r--r--test/expected/_Test.py9
-rw-r--r--test/expected/errors.py11
-rw-r--r--test/expected/interfaces.py5
-rw-r--r--test/expected/introspect.canon23
-rw-r--r--test/expected/spec.html.canon48
-rw-r--r--test/input/_Test.xml52
-rw-r--r--test/input/all.xml15
-rw-r--r--test/input/errors.xml6
8 files changed, 110 insertions, 59 deletions
diff --git a/test/expected/_Test.py b/test/expected/_Test.py
index f612aec3..22e82bf9 100644
--- a/test/expected/_Test.py
+++ b/test/expected/_Test.py
@@ -1,8 +1,7 @@
# Generated from the Telepathy spec
-"""\
- Copyright (C) 2006 Collabora Limited
-
- This library is free software; you can redistribute it and/or
+"""Copyright (C) 2006 Collabora Limited
+
+This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
@@ -29,7 +28,7 @@ class _Test(dbus.service.Interface):
self._interfaces.add(TEST_INTERFACE)
- @dbus.service.method(TEST_INTERFACE, in_signature='ba{sv}s', out_signature='asa(uv)')
+ @dbus.service.method(TEST_INTERFACE, in_signature='ba{sv}s', out_signature='a(uv)')
def DoStuff(self, badger, mushroom, snake):
"""
Does stuff.
diff --git a/test/expected/errors.py b/test/expected/errors.py
index ea6b1245..b934b050 100644
--- a/test/expected/errors.py
+++ b/test/expected/errors.py
@@ -1,8 +1,9 @@
-# Generated from the Telepathy spec
-"""\
- Copyright (C) 2006 Collabora Limited
-
- This library is free software; you can redistribute it and/or
+"""Exception classes, generated from the Telepathy spec
+
+Copyright (C) 2006 Collabora Limited
+
+
+This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
diff --git a/test/expected/interfaces.py b/test/expected/interfaces.py
index a572cc11..99c52aaa 100644
--- a/test/expected/interfaces.py
+++ b/test/expected/interfaces.py
@@ -1,7 +1,8 @@
-# Generated from the Telepathy spec
-"""\
+"""List of interfaces, generated from the Telepathy spec version 0.1.2
+
Copyright (C) 2006 Collabora Limited
+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
diff --git a/test/expected/introspect.canon b/test/expected/introspect.canon
index 214178c4..ea3d02a2 100644
--- a/test/expected/introspect.canon
+++ b/test/expected/introspect.canon
@@ -1 +1,22 @@
-<node xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" name="/_Test"><interface name="org.freedesktop.Telepathy.SpecAutoGenTest"><method name="DoStuff"><arg direction="in" name="badger" type="b"></arg><arg direction="in" name="mushroom" type="a{sv}"></arg><arg direction="in" name="snake" type="s"></arg><arg direction="out" type="asa(uv)"></arg></method><signal name="StuffHappened"><arg direction="in" name="stoat" type="ay"></arg><arg direction="in" name="ferret" type="s"></arg><arg direction="in" name="weasel" type="b"></arg></signal></interface></node> \ No newline at end of file
+<node xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" name="/_Test">
+<interface name="org.freedesktop.Telepathy.SpecAutoGenTest">
+<method name="DoStuff">
+<arg direction="in" name="badger" type="b">
+</arg>
+<arg direction="in" name="mushroom" type="a{sv}">
+</arg>
+<arg direction="in" name="snake" type="s">
+</arg>
+<arg direction="out" type="a(uv)">
+</arg>
+</method>
+<signal name="StuffHappened">
+<arg direction="in" name="stoat" type="ay">
+</arg>
+<arg direction="in" name="ferret" type="s">
+</arg>
+<arg direction="in" name="weasel" type="b">
+</arg>
+</signal>
+</interface>
+</node>
diff --git a/test/expected/spec.html.canon b/test/expected/spec.html.canon
index cca83c61..a9004b63 100644
--- a/test/expected/spec.html.canon
+++ b/test/expected/spec.html.canon
@@ -1,28 +1,42 @@
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=ascii" http-equiv="Content-Type"></meta><title>Telepathy D-Bus Interface Specification</title><style type="text/css" xml:space="preserve"></style></head><body><div class="topbox">Telepathy</div><h3>Version 0.1.2</h3><pre xml:space="preserve">
-Copyright (C) 2006 Collabora Limited
-
-This library is free software; you can redistribute it and/or
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=ascii" http-equiv="Content-Type"></meta><title>Telepathy D-Bus Interface Specification</title><style type="text/css" xml:space="preserve"></style></head><body><h1 class="topbox">Telepathy D-Bus Interface Specification</h1><h2>Version 0.1.2</h2><div>Copyright (C) 2006 Collabora Limited</div><p>This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
+version 2.1 of the License, or (at your option) any later version.</p><p>This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-</pre><h1><a id="org.freedesktop.Telepathy.SpecAutoGenTest" name="org.freedesktop.Telepathy.SpecAutoGenTest" shape="rect"></a>org.freedesktop.Telepathy.SpecAutoGenTest</h1><pre xml:space="preserve">
+Library General Public License for more details.</p><h1><a id="org.freedesktop.Telepathy.SpecAutoGenTest" name="org.freedesktop.Telepathy.SpecAutoGenTest" shape="rect"></a>org.freedesktop.Telepathy.SpecAutoGenTest</h1>
A test case for the spec processing.
- </pre><h2>Methods:</h2><div class="method"><h3>DoStuff (
+ <h2>Methods:</h2><div class="method"><h3>DoStuff (
b: badger, a{sv}: mushroom, s: snake
- ) -&gt;
- asa(uv)</h3><pre xml:space="preserve">
+ ) →
+ a(uv)</h3><div class="docstring">
Does stuff.
- </pre></div><h2>Signals:</h2><div class="signal"><h3>StuffHappened (
+ </div><div><h4>Parameters</h4><dl><dt><code>badger</code> -
+ <code>b</code></dt><dd>A badger, which MAY be breezy.</dd><dt><code>mushroom</code> -
+ <code>a{sv}</code></dt><dd>Use of hallucinogenic mushrooms will lead to undefined behaviour.</dd><dt><code>snake</code> -
+ <code>s</code></dt><dd>A snake, it's a snake.</dd></dl></div><div><h4>Returns</h4><dt><code>a(uv)</code></dt><dd>Array of structs containing whatever seems appropriate.</dd></div></div><h2>Signals:</h2><div class="signal"><h3>StuffHappened (
ay: stoat, s: ferret, b: weasel
- )</h3><pre xml:space="preserve">
+ )</h3><div class="docstring">
Emitted when stuff happened.
- </pre></div><h1 xmlns="">Errors</h1><h2><a id="org.freedesktop.Telepathy.SpecAutoGenTest.MiscError" name="org.freedesktop.Telepathy.SpecAutoGenTest.MiscError" shape="rect"></a>org.freedesktop.Telepathy.SpecAutoGenTest.MiscError</h2><pre xml:space="preserve">
+ </div><div><h4>Parameters</h4><dl><dt><code>stoat</code> -
+ <code>ay</code></dt><dd>
+ <em xmlns="">Mustela erminea</em>
+ </dd><dt><code>ferret</code> -
+ <code>s</code></dt><dd>
+ <em xmlns="">Mustela putorius furo</em>
+ </dd><dt><code>weasel</code> -
+ <code>b</code></dt><dd>
+ <em xmlns="">Mustela nivalis</em> (or compatible)
+ </dd></dl></div></div>
+<h1>Errors</h1>
+ <h2><a id="org.freedesktop.Telepathy.SpecAutoGenTest.MiscError" name="org.freedesktop.Telepathy.SpecAutoGenTest.MiscError" shape="rect"></a>org.freedesktop.Telepathy.SpecAutoGenTest.MiscError</h2>
Raised whenever appropriate.
- </pre><h2><a id="org.freedesktop.Telepathy.SpecAutoGenTest.OtherError" name="org.freedesktop.Telepathy.SpecAutoGenTest.OtherError" shape="rect"></a>org.freedesktop.Telepathy.SpecAutoGenTest.OtherError</h2><pre xml:space="preserve">
+
+
+ <h2><a id="org.freedesktop.Telepathy.SpecAutoGenTest.OtherError" name="org.freedesktop.Telepathy.SpecAutoGenTest.OtherError" shape="rect"></a>org.freedesktop.Telepathy.SpecAutoGenTest.OtherError</h2>
Raised at all other times.
- </pre></body></html> \ No newline at end of file
+
+
+
+
+</body></html> \ No newline at end of file
diff --git a/test/input/_Test.xml b/test/input/_Test.xml
index 66c64f8e..b27a8375 100644
--- a/test/input/_Test.xml
+++ b/test/input/_Test.xml
@@ -1,37 +1,55 @@
<?xml version="1.0" ?>
<node name="/_Test" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright>
- Copyright (C) 2006 Collabora Limited
- </tp:copyright>
- <tp:license>
- This library is free software; you can redistribute it and/or
+ <tp:copyright>Copyright (C) 2006 Collabora Limited</tp:copyright>
+ <tp:license xmlns="http://www.w3.org/1999/xhtml">
+<p>This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
+version 2.1 of the License, or (at your option) any later version.</p>
-This library is distributed in the hope that it will be useful,
+<p>This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+Library General Public License for more details.</p>
-You should have received a copy of the GNU Lesser General Public
+<p>You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p>
</tp:license>
<interface name="org.freedesktop.Telepathy.SpecAutoGenTest" tp:name-const="TEST_INTERFACE">
<method name="DoStuff">
- <arg direction="in" name="badger" type="b"/>
- <arg direction="in" name="mushroom" type="a{sv}"/>
- <arg direction="in" name="snake" type="s"/>
- <arg direction="out" type="asa(uv)"/>
+ <arg direction="in" name="badger" type="b">
+ <tp:docstring>A badger, which MAY be breezy.</tp:docstring>
+ </arg>
+ <arg direction="in" name="mushroom" type="a{sv}">
+ <tp:docstring>Use of hallucinogenic mushrooms will lead to undefined behaviour.</tp:docstring>
+ </arg>
+ <arg direction="in" name="snake" type="s">
+ <tp:docstring>A snake, it's a snake.</tp:docstring>
+ </arg>
+ <arg direction="out" type="a(uv)">
+ <tp:docstring>Array of structs containing whatever seems appropriate.</tp:docstring>
+ </arg>
<tp:docstring>
Does stuff.
</tp:docstring>
</method>
<signal name="StuffHappened">
- <arg name="stoat" type="ay"/>
- <arg name="ferret" type="s"/>
- <arg name="weasel" type="b"/>
+ <arg name="stoat" type="ay">
+ <tp:docstring>
+ <em>Mustela erminea</em>
+ </tp:docstring>
+ </arg>
+ <arg name="ferret" type="s">
+ <tp:docstring>
+ <em>Mustela putorius furo</em>
+ </tp:docstring>
+ </arg>
+ <arg name="weasel" type="b">
+ <tp:docstring>
+ <em>Mustela nivalis</em> (or compatible)
+ </tp:docstring>
+ </arg>
<tp:docstring>
Emitted when stuff happened.
</tp:docstring>
diff --git a/test/input/all.xml b/test/input/all.xml
index f18e8066..6e59e0e0 100644
--- a/test/input/all.xml
+++ b/test/input/all.xml
@@ -4,22 +4,21 @@
<tp:version>0.1.2</tp:version>
-<tp:docstring>
-Copyright (C) 2006 Collabora Limited
-
-This library is free software; you can redistribute it and/or
+<tp:copyright>Copyright (C) 2006 Collabora Limited</tp:copyright>
+<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+<p>This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
+version 2.1 of the License, or (at your option) any later version.</p>
-This library is distributed in the hope that it will be useful,
+<p>This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+Library General Public License for more details.</p>
</tp:docstring>
<xi:include href="_Test.xml"/>
-<xi:include href="errors_test.xml"/>
+<xi:include href="errors.xml"/>
</tp:spec>
diff --git a/test/input/errors.xml b/test/input/errors.xml
index b201926c..7bf3f634 100644
--- a/test/input/errors.xml
+++ b/test/input/errors.xml
@@ -12,11 +12,9 @@
</tp:docstring>
</tp:error>
- <tp:copyright>
- Copyright (C) 2006 Collabora Limited
- </tp:copyright>
+ <tp:copyright>Copyright (C) 2006 Collabora Limited</tp:copyright>
<tp:license>
- This library is free software; you can redistribute it and/or
+This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.