qutebrowser/tests/unit/config
Florian Bruhin 9ac2dbcc80 Disallow surrogate escapes in dicts and lists in the config
In Dict.to_str() and List.to_str() we use json.dump to get a value. However,
JSON includes surrogate escapes in the dumped values, which breaks round trips.

>>> yaml.load(json.dumps({'\U00010000': True}))
{'\ud800\udc00': True}

>>> yaml.load(json.dumps({'\U00010000': True}, ensure_ascii=False))
yaml.reader.ReaderError: unacceptable character #x10000: special characters are not allowed

See:
https://stackoverflow.com/a/38552626/2085149
https://news.ycombinator.com/item?id=12798032
2017-07-04 15:09:23 +02:00
..
test_config.py Fix config things relying on dict order 2017-07-04 15:08:04 +02:00
test_configdata.py Fix config things relying on dict order 2017-07-04 15:08:04 +02:00
test_configexc.py Add a test for DuplicateKeyError 2017-07-04 15:08:03 +02:00
test_configfiles.py Clean up objreg properly in config tests 2017-07-04 15:08:04 +02:00
test_configtypes.py Disallow surrogate escapes in dicts and lists in the config 2017-07-04 15:09:23 +02:00