summaryrefslogtreecommitdiff
path: root/docutils/test/functional/input
diff options
context:
space:
mode:
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2010-03-02 11:51:33 +0000
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2010-03-02 11:51:33 +0000
commitbabeacc0221e1ffe61e66cf91623853458c2fc02 (patch)
treeecff2ec72e40f752bf167c67c4d962c30b466abb /docutils/test/functional/input
parent767f1f92900ea84d3e8e234d76f0eeefc47ce08a (diff)
downloaddocutils-babeacc0221e1ffe61e66cf91623853458c2fc02.tar.gz
support SWF images,
improve formatting of HTML test output. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@6254 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/functional/input')
-rw-r--r--docutils/test/functional/input/data/standard.txt19
-rw-r--r--docutils/test/functional/input/data/svg_images.txt57
-rw-r--r--docutils/test/functional/input/data/swf_images.txt24
-rw-r--r--docutils/test/functional/input/standalone_rst_html4css1.txt1
4 files changed, 66 insertions, 35 deletions
diff --git a/docutils/test/functional/input/data/standard.txt b/docutils/test/functional/input/data/standard.txt
index 5b099a1ac..37efd1036 100644
--- a/docutils/test/functional/input/data/standard.txt
+++ b/docutils/test/functional/input/data/standard.txt
@@ -520,7 +520,8 @@ A left-aligned figure:
:class: class1 class2
:alt: reStructuredText, the markup syntax
:align: left
- :width: 50
+ :width: 40 px
+ :figwidth: 70 %
This is the caption.
@@ -528,14 +529,16 @@ A left-aligned figure:
The legend may consist of several paragraphs.
-This paragraph might flow around the figure. The specific behavior depends
-upon the style sheet and the browser or rendering software used.
+This paragraph might flow around the figure.
+
+The specific behavior depends upon the style sheet and the browser or
+rendering software used.
A centered figure:
.. figure:: ../../../docs/user/rst/images/biohazard.png
:align: center
- :width: 50
+ :width: 40 px
This is the caption.
@@ -543,14 +546,16 @@ A centered figure:
The legend may consist of several paragraphs.
-This paragraph might flow around the figure. The specific behavior depends
-upon the style sheet and the browser or rendering software used.
+This paragraph might flow around the figure.
+
+The specific behavior depends upon the style sheet and the browser or
+rendering software used.
A right-aligned figure:
.. figure:: ../../../docs/user/rst/images/biohazard.png
:align: right
- :width: 50
+ :width: 40 px
This is the caption.
diff --git a/docutils/test/functional/input/data/svg_images.txt b/docutils/test/functional/input/data/svg_images.txt
index b620823b1..300575232 100644
--- a/docutils/test/functional/input/data/svg_images.txt
+++ b/docutils/test/functional/input/data/svg_images.txt
@@ -1,47 +1,51 @@
SVG Images
----------
+.. image:: ../../../docs/user/rst/images/biohazard.svg
+ :width: 48 px
+ :height: 48 px
+
Scalable vector graphics (SVG) images are not supported by all backends.
Rendering depends partially on the backend, especially if the size is
not explicitely given.
+.. image:: ../../../docs/user/rst/images/title-scaling.svg
+ :width: 50%
+ :align: left
+
+A scaling image occupying 50% of the line width (scales with the
+browser window).
+
Whether an SVG image is scaled or clipped/padded cannot be set in the
containing HTML. It depends on the viewport declaration inside its
root <svg> element.
+.. |inline-svg| image:: ../../../docs/user/rst/images/biohazard-scaling.svg
+ :height: 0.8 em
+
+An inline SVG image |inline-svg| scaled to a height of 0.8 em.
+
+.. image:: ../../../docs/user/rst/images/title-scaling.svg
+ :width: 50 %
+ :height: 1.2 em
+ :align: right
+
+A scaling image occupying 50% of the line width and 1.2 em high,
+right aligned (this SVG image keeps the aspect ratio):
+
.. image:: ../../../docs/user/rst/images/biohazard-scaling.svg
:height: 1 em
:align: left
A scaling image 1 em high, left aligned.
+A scaling image 5 mm x 5 mm, centered, with hyperlink reference:
+
.. image:: ../../../docs/user/rst/images/biohazard-scaling.svg
:target: Directives_
:width: 5 mm
- :align: right
-
-A scaling image 5 mm wide, right aligned, with hyperlink reference:
-
-.. image:: ../../../docs/user/rst/images/title-scaling.svg
- :width: 50%
- :align: left
-
-A scaling image occupying 50% of the line width (scales with the
-browser window):
-
-.. image:: ../../../docs/user/rst/images/title-scaling.svg
- :width: 50 %
- :height: 15 px
- :align: left
-
-A scaling image occupying 50% of the line width and 15 pixel high
-(this SVG image keeps the aspect ratio):
-
-
-.. |inline-svg| image:: ../../../docs/user/rst/images/biohazard-scaling.svg
- :height: 0.8 em
-
-An inline image |inline-svg| scaled to match the text size.
+ :height: 5 mm
+ :align: center
.. image:: ../../../docs/user/rst/images/biohazard.svg
:width: 4 cm
@@ -57,12 +61,9 @@ A fixed-size image in a 4 cm x 2 em box.
A fixed-size image in a box 50% the line width and 15 pixle high.
-SVG image in a figure:
-
.. figure:: ../../../docs/user/rst/images/title.svg
:alt: reStructuredText, the markup syntax
:width: 290 px
:height: 28 px
- This is the caption.
-
+ SVG image in a figure.
diff --git a/docutils/test/functional/input/data/swf_images.txt b/docutils/test/functional/input/data/swf_images.txt
new file mode 100644
index 000000000..7e9664060
--- /dev/null
+++ b/docutils/test/functional/input/data/swf_images.txt
@@ -0,0 +1,24 @@
+SWF Images
+----------
+
+Shockwave Flash is an image/movie format that most modern web browsers
+support via a plugin. It is sometimes blocked due to privacy/security
+concerns.
+
+Images with extension ``.swf`` are placed inside <object> elements.
+For complete control over display options use raw HTML.
+
+.. image:: ../../../docs/user/rst/images/biohazard.swf
+ :alt: [biohazard.swf]
+ :width: 4 cm
+ :height: 2 em
+ :align: left
+
+An SWF image in a 4 cm x 2 em box, left aligned.
+
+.. |inline-swf| image:: ../../../docs/user/rst/images/biohazard.swf
+ :width: 0.8 em
+ :height: 0.8 em
+
+An inline SWF image |inline-swf| scaled to 8.0 em x 0.8 em.
+
diff --git a/docutils/test/functional/input/standalone_rst_html4css1.txt b/docutils/test/functional/input/standalone_rst_html4css1.txt
index a3c686ea7..8580daac6 100644
--- a/docutils/test/functional/input/standalone_rst_html4css1.txt
+++ b/docutils/test/functional/input/standalone_rst_html4css1.txt
@@ -6,4 +6,5 @@
.. include:: data/list_table.txt
.. include:: data/custom_roles.txt
.. include:: data/svg_images.txt
+.. include:: data/swf_images.txt
.. include:: data/errors.txt