aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2014-09-25 21:17:57 -0400
committerWaylan Limberg <waylan@gmail.com>2014-09-25 21:17:57 -0400
commit39c8c1c64fe04bbde625b314386cb109b11527da (patch)
tree430677226b602e67aeee5b08115a43e0a0747709 /tests
parent5fa6d0be20ec6392b265968e24a528b10128ede8 (diff)
downloadmarkdown-39c8c1c64fe04bbde625b314386cb109b11527da.tar.gz
markdown-39c8c1c64fe04bbde625b314386cb109b11527da.tar.bz2
markdown-39c8c1c64fe04bbde625b314386cb109b11527da.zip
Fixed TOC Option parsing.
The new option parser assumes bool values if the default is bool or None. As the "title" option is not a bool value, it should default to an empty string rather than None. Fixes #347.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_apis.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/test_apis.py b/tests/test_apis.py
index b19db62..34cd6f0 100644
--- a/tests/test_apis.py
+++ b/tests/test_apis.py
@@ -590,7 +590,7 @@ class TestCliOptionParsing(unittest.TestCase):
with os.fdopen(fd, 'w') as fp:
fp.write(config)
- def testExtensonConfigOption(self):
+ def testExtensionConfigOption(self):
config = {
'markdown.extensions.wikilinks': {
'base_url': 'http://example.com/',
@@ -606,6 +606,19 @@ class TestCliOptionParsing(unittest.TestCase):
self.default_options['extension_configs'] = config
self.assertEqual(options, self.default_options)
+ def textBoolExtensionConfigOption(self):
+ config = {
+ 'markdown.extensions.toc': {
+ 'title': 'Some Title',
+ 'anchorlink': True,
+ 'permalink': True
+ }
+ }
+ self.create_config_file(config)
+ options, logging_level = parse_options(['-c', self.tempfile])
+ self.default_options['extension_configs'] = config
+ self.assertEqual(options, self.default_options)
+
def testExtensonConfigOptionAsJSON(self):
config = {
'markdown.extensions.wikilinks': {