diff options
Diffstat (limited to 'tests/test_build.py')
-rw-r--r-- | tests/test_build.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_build.py b/tests/test_build.py index 5f24f89ac..ae3f29211 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -10,6 +10,7 @@ """ from util import * +from textwrap import dedent def teardown_module(): @@ -61,3 +62,22 @@ else: @with_app(buildername='singlehtml', cleanenv=True) def test_singlehtml(app): app.builder.build_all() + +@with_app(buildername='html', srcdir='(temp)') +def test_multibyte_path(app): + srcdir = path(app.srcdir) + mb_name = u'\u65e5\u672c\u8a9e' + (srcdir / mb_name).makedirs() + (srcdir / mb_name / (mb_name + '.txt')).write_text(dedent(""" + multi byte file name page + ========================== + """)) + + master_doc = srcdir / 'contents.txt' + master_doc.write_bytes((master_doc.text() + dedent(""" + .. toctree:: + + %(mb_name)s/%(mb_name)s + """ % locals()) + ).encode('utf-8')) + app.builder.build_all() |