Commits

Anonymous committed c7efa94

Add some tests.

Comments (0)

Files changed (5)

test/System/HTML/DefaultParameters_MissingConfig/project/SConstruct

+environment = Environment ( tools = [ 'sphinx' ] )
+environment.HTML ( )

test/System/HTML/DefaultParameters_MissingConfig/project/source/file.rst

Empty file added.

test/System/HTML/DefaultParameters_MissingConfig/sconstest-.py

+# -*- mode:python; coding:utf-8 -*-
+
+#  A SCons tool to enable Sphinx processing.
+#
+#  Copyright © 2011 Russel Winder
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+'''
+A test to show that using the default parameters to the HTML builder works as required.
+'''
+
+__author__ = 'Russel Winder <russel@russel.org.uk>'
+__date__ = '2011-08-31'
+
+import os
+import sys
+
+sys.path.append ( os.path.realpath ( os.path.dirname ( __file__ ) + '/../..' ) )
+
+from common import setUpTest
+
+import TestSCons
+
+test = TestSCons.TestSCons ( )
+setUpTest ( test )
+test.run ( stderr = r""".*
+Error: Source directory doesn't contain conf.py file.
+scons: \*\*\* \[build/html/file.html\] Error 1""" , match = TestSCons.match_re_dotall , status = 2 )
+test.pass_test ( )

test/System/HTML/DefaultParameters_NoSourceDirectory/project/SConstruct

+environment = Environment ( tools = [ 'sphinx' ] )
+environment.HTML ( )

test/System/HTML/DefaultParameters_NoSourceDirectory/sconstest-.py

+# -*- mode:python; coding:utf-8 -*-
+
+#  A SCons tool to enable Sphinx processing.
+#
+#  Copyright © 2011 Russel Winder
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+'''
+A test to show that using the default parameters to the HTML builder works as required.
+'''
+
+__author__ = 'Russel Winder <russel@russel.org.uk>'
+__date__ = '2011-08-31'
+
+import os
+import sys
+
+sys.path.append ( os.path.realpath ( os.path.dirname ( __file__ ) + '/../..' ) )
+
+from common import setUpTest
+
+import TestSCons
+
+test = TestSCons.TestSCons ( )
+setUpTest ( test )
+#test.run ( )
+test.run ( stderr = None )
+test.pass_test ( )