4 # Author: David Goodger <goodger@python.org>
5 # Copyright: This module has been placed in the public domain.
8 Tests for the S5/HTML writer.
14 from __init__
import DocutilsTestSupport
18 settings
= {'stylesheet_path': '/test.css',
19 'embed_stylesheet': 0,}
20 s
= DocutilsTestSupport
.PublishTestSuite('s5', suite_settings
=settings
)
21 s
.generateTests(totest_1
)
22 settings
['hidden_controls'] = 0
23 settings
['view_mode'] = 'outline'
24 s
.generateTests(totest_2
)
28 'version': DocutilsTestSupport
.docutils
.__version
__,
31 if platform
.system() == "Windows":
32 interpolations
['drive'] = "C:"
37 totest_1
['basics'] = [
51 <?xml version="1.0" encoding="utf-8" ?>
52 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
53 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
55 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
56 <meta name="generator" content="Docutils %(version)s: http://docutils.sourceforge.net/" />
57 <meta name="version" content="S5 1.1" />
58 <title>Show Title</title>
59 <link rel="stylesheet" href="%(drive)s/test.css" type="text/css" />
60 <!-- configuration parameters -->
61 <meta name="defaultView" content="slideshow" />
62 <meta name="controlVis" content="hidden" />
63 <!-- style sheet links -->
64 <script src="ui/default/slides.js" type="text/javascript"></script>
65 <link rel="stylesheet" href="ui/default/slides.css"
66 type="text/css" media="projection" id="slideProj" />
67 <link rel="stylesheet" href="ui/default/outline.css"
68 type="text/css" media="screen" id="outlineStyle" />
69 <link rel="stylesheet" href="ui/default/print.css"
70 type="text/css" media="print" id="slidePrint" />
71 <link rel="stylesheet" href="ui/default/opera.css"
72 type="text/css" media="projection" id="operaFix" />
74 <style type="text/css">
75 #currentSlide {display: none;}
80 <div id="controls"></div>
81 <div id="currentSlide"></div>
90 <div class="presentation">
91 <div class="slide" id="slide0">
92 <h1 class="title">Show Title</h1>
97 <div class="slide" id="first-slide">
104 """ % interpolations
]
107 totest_2
['settings'] = [
113 We're just checking the settings
116 <?xml version="1.0" encoding="utf-8" ?>
117 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
118 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
120 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
121 <meta name="generator" content="Docutils %(version)s: http://docutils.sourceforge.net/" />
122 <meta name="version" content="S5 1.1" />
123 <title>Bogus Slide Show</title>
124 <link rel="stylesheet" href="%(drive)s/test.css" type="text/css" />
125 <!-- configuration parameters -->
126 <meta name="defaultView" content="outline" />
127 <meta name="controlVis" content="visible" />
128 <!-- style sheet links -->
129 <script src="ui/default/slides.js" type="text/javascript"></script>
130 <link rel="stylesheet" href="ui/default/slides.css"
131 type="text/css" media="projection" id="slideProj" />
132 <link rel="stylesheet" href="ui/default/outline.css"
133 type="text/css" media="screen" id="outlineStyle" />
134 <link rel="stylesheet" href="ui/default/print.css"
135 type="text/css" media="print" id="slidePrint" />
136 <link rel="stylesheet" href="ui/default/opera.css"
137 type="text/css" media="projection" id="operaFix" />
139 <style type="text/css">
140 #currentSlide {display: none;}
145 <div id="controls"></div>
146 <div id="currentSlide"></div>
151 <h1>Bogus Slide Show</h1>
155 <div class="presentation">
156 <div class="slide" id="slide0">
157 <h1 class="title">Bogus Slide Show</h1>
159 <p>We're just checking the settings</p>
164 """ % interpolations
]
167 if __name__
== '__main__':
169 unittest
.main(defaultTest
='suite')