
Testing downloadable files
**************************

Download "img.png" here. Download "this" there. Don't download "this".


Test file and literal inclusion
*******************************

[image][image]

   # Literally included file using Python highlighting
   # -*- coding: utf-8 -*-

   foo = "Including Unicode characters: üöä"

   class Foo:
       pass

   class Bar:
       def baz():
           pass

   def bar(): pass

<SYSTEM MESSAGE: /Users/tkomiya/work/sphinx/tests/build/日本語
/includes.txt:9: (WARNING/2) Encoding 'utf-8-sig' used for reading
included file u'/Users/tkomiya/work/sphinx/tests/build/\u65e5\u672c\u
8a9e/wrongenc.inc' seems to be wrong, try giving an :encoding: option>

   This file is encoded in latin-1 but at first read as utf-8.

   Max Strauß aß in München eine Leberkässemmel.

This file is encoded in latin-1 but at first read as utf-8.

Max Strauß aß in München eine Leberkässemmel.


Literalinclude options
**********************

   class Foo:
       pass

       def baz():
           pass

   class Foo:
       pass
   class Bar:


   foo = "Including Unicode characters: üöä"


   START CODE
   # Literally included file using Python highlighting
   # -*- coding: utf-8 -*-

   foo = "Including Unicode characters: üöä"

   class Foo:
       pass

   class Bar:
       def baz():
           pass

   def bar(): pass
   END CODE


   foo = "Including Unicode characters: üöä"

   class Foo:
       pass

   class Bar:
       def baz():
           pass

   def bar(): pass

   # Literally included file using Python highlighting
   # -*- coding: utf-8 -*-

   foo = "Including Unicode characters: üöä"


   --- literal_orig.inc
   +++ literal.inc
   @@ -1,12 +1,12 @@
    # Literally included file using Python highlighting
    # -*- coding: utf-8 -*-
    
   -foo = "Including Unicode characters: üöä"  # This will be changed
   +foo = "Including Unicode characters: üöä"
    
   -class FooOrig:
   +class Foo:
        pass
    
   -class BarOrig:
   +class Bar:
        def baz():
            pass
    

   Tabs include file test
   ----------------------

   The next line has a tab:
   -| |-

   Tabs include file test
   ----------------------

   The next line has a tab:
   -|      |-

   class Foo:
       pass

   class Foo:
       pass



   foo = "Including Unicode characters: üöä"


Test if dedenting before parsing works.

       def baz():
           pass


Docutils include with "literal"
*******************************

While not recommended, it should work (and leave quotes alone).

   Testing "quotes" in literal 'included' text.
