1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
<?xml version="1.0" encoding="utf-8"?>
<project name="test" basedir="." default="test.single.all">
<target name="testSingleFileParameterFile" description="render a single rST file. Only the file attribute is set">
<rST file="files/single.rst" />
</target>
<target name="testSingleFileParameterFileNoExt" description="render a single rST file. Only the file attribute is set">
<rST file="files/single-no-ext" />
</target>
<target name="testSingleFileParameterFileFormat" description="render a single rST file. file+format attributes are set">
<rST format="man" file="files/single.rst" />
</target>
<target name="testSingleFileInvalidParameterFormat" description="invalid format attribute">
<rST format="foo" file="files/single.rst" />
</target>
<target name="testSingleFileParameterFileFormatDestination" description="render a single rST file, file+format+destination attributes">
<rST format="html" file="files/single.rst" destination="files/single-destination.html" />
</target>
<target name="testParameterDestinationAsDirectory" description="using a destination directory">
<rST format="html" file="files/single.rst" destination="files/subdir/" />
</target>
<target name="testParameterDestinationDirectoryWithFileset" description="using a destination directory and a file set">
<rST format="html" destination="files/subdir/">
<fileset dir="files">
<include name="single.rst" />
<include name="two.rst" />
</fileset>
</rST>
</target>
<target name="testParameterDestinationDirectoryWithFilesetDot" description="using a destination directory and a file set, with a . as dir">
<rST format="html" destination="files/subdir/">
<fileset dir=".">
<include name="files/single.rst" />
<include name="files/two.rst" />
</fileset>
</rST>
</target>
<target name="testParameterUptodate" description="Test if the uptodate attribute works">
<delete file="files/single.html" quiet="yes" />
<touch file="files/single.html" />
<rST file="files/single.rst" uptodate="yes" />
</target>
<target name="testDirectoryCreation" description="Test if creating destination directories works">
<rST file="files/single.rst" destination="files/a/b/c/single.html" />
</target>
<target name="testBrokenFile" description="try to render a broken file">
<rST file="files/broken.rst" />
</target>
<target name="testMissingFiles" description="omit both file and fileset params">
<rST />
</target>
<target name="testMultiple" description="render multiple rST files">
<rST>
<fileset dir=".">
<include name="files/single.rst" />
<include name="files/two.rst" />
</fileset>
</rST>
</target>
<target name="testMultipleDir" description='render multiple rST files, with a "dir" attribute'>
<rST>
<fileset dir="files">
<include name="single.rst" />
<include name="two.rst" />
</fileset>
</rST>
</target>
<target name="testMultipleDirWildcard" description='render multiple rST files, dir attribute and wildcard'>
<rST>
<fileset dir="files">
<include name="s*.rst" />
</fileset>
</rST>
</target>
<target name="testMultipleMapper" description="render multiple rST files and map their names">
<rST>
<fileset dir=".">
<include name="files/single.rst" />
<include name="files/two.rst" />
</fileset>
<mapper type="glob" from="*.rst" to="*.my.html" />
</rST>
</target>
<target name="testNotMatchingMapper" description="try to render a file that does not match a mapper">
<rST>
<fileset dir=".">
<include name="files/single.rst" />
</fileset>
<mapper type="glob" from="*.txt" to="*.html" />
</rST>
</target>
<target name="testFilterChain" description="use a filter chain">
<rST>
<fileset dir=".">
<include name="files/filterchain.rst" />
</fileset>
<filterchain>
<replacetokens begintoken="##" endtoken="##">
<token key="foo" value="bar" />
</replacetokens>
</filterchain>
</rST>
</target>
<target name="testCustomParameter" description="pass custom parameters to the rst2* tool">
<rST file="files/single.rst" toolparam="--stylesheet-path=custom.css" />
</target>
</project>
|