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.
12 from __init__
import DocutilsTestSupport
16 settings
= {'stylesheet_path': '/test.css',
17 'embed_stylesheet': 0,}
18 s
= DocutilsTestSupport
.PublishTestSuite('s5', suite_settings
=settings
)
19 s
.generateTests(totest_1
)
20 settings
['hidden_controls'] = 0
21 settings
['view_mode'] = 'outline'
22 s
.generateTests(totest_2
)
25 interpolations
= {'version': DocutilsTestSupport
.docutils
.__version
__}
30 totest_1
['basics'] = [
44 <?xml version="1.0" encoding="utf-8" ?>
45 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
46 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
48 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
49 <meta name="generator" content="Docutils %(version)s: http://docutils.sourceforge.net/" />
50 <meta name="version" content="S5 1.1" />
51 <title>Show Title</title>
52 <link rel="stylesheet" href="/test.css" type="text/css" />
53 <!-- configuration parameters -->
54 <meta name="defaultView" content="slideshow" />
55 <meta name="controlVis" content="hidden" />
56 <!-- style sheet links -->
57 <script src="ui/default/slides.js" type="text/javascript"></script>
58 <link rel="stylesheet" href="ui/default/slides.css"
59 type="text/css" media="projection" id="slideProj" />
60 <link rel="stylesheet" href="ui/default/outline.css"
61 type="text/css" media="screen" id="outlineStyle" />
62 <link rel="stylesheet" href="ui/default/print.css"
63 type="text/css" media="print" id="slidePrint" />
64 <link rel="stylesheet" href="ui/default/opera.css"
65 type="text/css" media="projection" id="operaFix" />
67 <style type="text/css">
68 #currentSlide {display: none;}
73 <div id="controls"></div>
74 <div id="currentSlide"></div>
83 <div class="presentation">
84 <div class="slide" id="slide0">
85 <h1 class="title">Show Title</h1>
90 <div class="slide" id="first-slide">
100 totest_2
['settings'] = [
106 We're just checking the settings
109 <?xml version="1.0" encoding="utf-8" ?>
110 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
111 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
113 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
114 <meta name="generator" content="Docutils %(version)s: http://docutils.sourceforge.net/" />
115 <meta name="version" content="S5 1.1" />
116 <title>Bogus Slide Show</title>
117 <link rel="stylesheet" href="/test.css" type="text/css" />
118 <!-- configuration parameters -->
119 <meta name="defaultView" content="outline" />
120 <meta name="controlVis" content="visible" />
121 <!-- style sheet links -->
122 <script src="ui/default/slides.js" type="text/javascript"></script>
123 <link rel="stylesheet" href="ui/default/slides.css"
124 type="text/css" media="projection" id="slideProj" />
125 <link rel="stylesheet" href="ui/default/outline.css"
126 type="text/css" media="screen" id="outlineStyle" />
127 <link rel="stylesheet" href="ui/default/print.css"
128 type="text/css" media="print" id="slidePrint" />
129 <link rel="stylesheet" href="ui/default/opera.css"
130 type="text/css" media="projection" id="operaFix" />
132 <style type="text/css">
133 #currentSlide {display: none;}
138 <div id="controls"></div>
139 <div id="currentSlide"></div>
144 <h1>Bogus Slide Show</h1>
148 <div class="presentation">
149 <div class="slide" id="slide0">
150 <h1 class="title">Bogus Slide Show</h1>
152 <p>We're just checking the settings</p>
157 """ % interpolations
]
160 if __name__
== '__main__':
162 unittest
.main(defaultTest
='suite')