Added an extra assert to testString.

This commit is contained in:
Jeremy Fincher 2004-01-21 19:08:02 +00:00
parent 0cb2be6d3f
commit 1714359f0a

View File

@ -88,6 +88,8 @@ class ValuesTestCase(unittest.TestCase):
self.assertEqual(v(), 'bar')
v.set('"biff"')
self.assertEqual(v(), 'biff')
v.set("'buff'")
self.assertEqual(v(), 'buff')
v.set('"xyzzy')
self.assertEqual(v(), '"xyzzy')
@ -110,4 +112,13 @@ class ValuesTestCase(unittest.TestCase):
v.set('&&')
self.assertEqual(v(), ' && ')
def testCommaSeparatedListOfStrings(self):
v = registry.CommaSeparatedListOfStrings(['foo', 'bar'], 'help')
self.assertEqual(v(), ['foo', 'bar'])
v.setValue(['foo', 'bar', 'baz'])
self.assertEqual(v(), ['foo', 'bar', 'baz'])
v.set('foo,bar')
self.assertEqual(v(), ['foo', 'bar'])
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: