changeset 3400:b12aba864312

fix bug in parse_quoted_separated_ext and add tests that caught the bug
author Johannes Berg <johannes AT sipsolutions DOT net>
date Sat, 22 Mar 2008 01:37:49 +0100
parents b6d727809985
children d75e838f4b72
files MoinMoin/_tests/test_wikiutil.py MoinMoin/wikiutil.py
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_wikiutil.py	Sat Mar 22 01:20:57 2008 +0100
+++ b/MoinMoin/_tests/test_wikiutil.py	Sat Mar 22 01:37:49 2008 +0100
@@ -351,6 +351,8 @@
             (u'a a:"b "" d" a', None, u':', [u'a', (u'a', u'b " d'), u'a']),
             (u'title:Help* dog cat', None, u':', [(u'title', u'Help*'), u'dog', u'cat']),
             (u'title:Help* "dog cat"', None, u':', [(u'title', u'Help*'), u'dog cat']),
+            (u'a:b:c d:e:f', None, u':', [(u'a', u'b:c'), (u'd', 'e:f')]),
+            (u'a:b:c:d', None, u':', [(u'a', u'b:c:d')]),
         ]
 
         def _check(args, sep, kwsep, expected):
--- a/MoinMoin/wikiutil.py	Sat Mar 22 01:20:57 2008 +0100
+++ b/MoinMoin/wikiutil.py	Sat Mar 22 01:37:49 2008 +0100
@@ -1418,7 +1418,7 @@
                 cur_quoted = False
                 cur_present = YES
             else:
-                cur += '='
+                cur += name_value_separator
             noquote = False
         elif not quoted and not seplimit_reached and char in separators:
             if cur_present != NO: