~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_config.py

  • Committer: Vincent Ladeuil
  • Date: 2016-01-21 11:42:23 UTC
  • mto: This revision was merged to the branch mainline in revision 6610.
  • Revision ID: v.ladeuil+lp@free.fr-20160121114223-ngcvndi02ydiqs5z
Allow hyphens in option names to unbreak compatibility.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2237
2237
        self.assertTrue(self.is_valid('__bar__'))
2238
2238
        self.assertTrue(self.is_valid('a_'))
2239
2239
        self.assertTrue(self.is_valid('a1'))
 
2240
        # Don't break bzr-svn for no good reason
 
2241
        self.assertTrue(self.is_valid('guessed-layout'))
2240
2242
 
2241
2243
    def test_invalid_names(self):
2242
2244
        self.assertFalse(self.is_valid(' foo'))
2250
2252
        self.assertFalse(self.is_valid('{}'))
2251
2253
        self.assertFalse(self.is_valid('{a}'))
2252
2254
        self.assertFalse(self.is_valid('a\n'))
 
2255
        self.assertFalse(self.is_valid('-'))
 
2256
        self.assertFalse(self.is_valid('-a'))
 
2257
        self.assertFalse(self.is_valid('a-'))
 
2258
        self.assertFalse(self.is_valid('a--a'))
2253
2259
 
2254
2260
    def assertSingleGroup(self, reference):
2255
2261
        # the regexp is used with split and as such should match the reference