comparison mercurial/ui.py @ 34957:58e7791e243b

ui: add configlist doctest to document a bit more of the whitespace behavior I'm surprised this wasn't explicitly tested, so I added a test.
author Augie Fackler <augie@google.com>
date Wed, 25 Oct 2017 23:01:54 -0400
parents ff2110eadbfa
children 929858db4d22
comparison
equal deleted inserted replaced
34956:3ce0e4b51f78 34957:58e7791e243b
693 693
694 >>> u = ui(); s = b'foo' 694 >>> u = ui(); s = b'foo'
695 >>> u.setconfig(s, b'list1', b'this,is "a small" ,test') 695 >>> u.setconfig(s, b'list1', b'this,is "a small" ,test')
696 >>> u.configlist(s, b'list1') 696 >>> u.configlist(s, b'list1')
697 ['this', 'is', 'a small', 'test'] 697 ['this', 'is', 'a small', 'test']
698 >>> u.setconfig(s, b'list2', b'this, is "a small" , test ')
699 >>> u.configlist(s, b'list2')
700 ['this', 'is', 'a small', 'test']
698 """ 701 """
699 # default is not always a list 702 # default is not always a list
700 v = self.configwith(config.parselist, section, name, default, 703 v = self.configwith(config.parselist, section, name, default,
701 'list', untrusted) 704 'list', untrusted)
702 if isinstance(v, bytes): 705 if isinstance(v, bytes):