mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix: Output TeX/texinfo/man filename has no basename (only extention) when using multibyte characters to "Project name" on quickstart. Closes #1190
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -30,6 +30,8 @@ Bugs fixed
|
||||
includes non-ASCII characters.
|
||||
* #1189: "Title underline is short" WARNING is given when using fullwidth
|
||||
characters to "Project name" on quickstart.
|
||||
* #1190: Output TeX/texinfo/man filename has no basename (only extention)
|
||||
when using multibyte characters to "Project name" on quickstart.
|
||||
|
||||
|
||||
Release 1.2 (beta1 released Mar 31, 2013)
|
||||
|
||||
@@ -134,7 +134,7 @@ def copyfile(source, dest):
|
||||
no_fn_re = re.compile(r'[^a-zA-Z0-9_-]')
|
||||
|
||||
def make_filename(string):
|
||||
return no_fn_re.sub('', string)
|
||||
return no_fn_re.sub('', string) or 'sphinx'
|
||||
|
||||
if sys.version_info < (3, 0):
|
||||
# strftime for unicode strings
|
||||
|
||||
@@ -263,3 +263,25 @@ def test_quickstart_and_build(tmpdir):
|
||||
app.builder.build_all()
|
||||
warnings = warnfile.getvalue()
|
||||
assert not warnings
|
||||
|
||||
|
||||
@with_tempdir
|
||||
def test_default_filename(tempdir):
|
||||
answers = {
|
||||
'Root path': tempdir,
|
||||
'Project name': u'\u30c9\u30a4\u30c4', #Fullwidth characters only
|
||||
'Author name': 'Georg Brandl',
|
||||
'Project version': '0.1',
|
||||
}
|
||||
qs.term_input = mock_raw_input(answers)
|
||||
d = {}
|
||||
qs.ask_user(d)
|
||||
qs.generate(d)
|
||||
|
||||
conffile = tempdir / 'conf.py'
|
||||
assert conffile.isfile()
|
||||
ns = {}
|
||||
execfile_(conffile, ns)
|
||||
assert ns['latex_documents'][0][1] == 'sphinx.tex'
|
||||
assert ns['man_pages'][0][1] == 'sphinx'
|
||||
assert ns['texinfo_documents'][0][1] == 'sphinx'
|
||||
|
||||
Reference in New Issue
Block a user