File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,23 @@ def test_squash_simple(self):
116116 res = cov .squash (version , tc ['name' ], tc ['version' ])
117117 self .assertEqual (res , {}) # very simple
118118
119+ # Ensure that a version of '0' with trailing '.0's is matched against '0.0' but not anything higher
120+ # This is for testing the DEFAULT_UNDEFINED_VERSION detection
121+ for num_zeroes in range (1 , 6 ):
122+ tc = tc_first
123+ zero_version = '.' .join (['0' ] * num_zeroes )
124+ txt = [
125+ '[SUPPORTED]' ,
126+ 'versions = ' + zero_version ,
127+ 'toolchains = ' + tc_tmpl % tc ,
128+ '[DEFAULT]' ,
129+ 'y=a' ,
130+ ]
131+ co = ConfigObj (txt )
132+ cov = EBConfigObj (co )
133+ self .assertEqual (cov .squash ('0.0' , tc ['name' ], tc ['version' ]), {'y' : 'a' })
134+ self .assertEqual (cov .squash ('0.1' , tc ['name' ], tc ['version' ]), {})
135+
119136 def test_squash_invalid (self ):
120137 """Try to squash invalid files. Should trigger error"""
121138 tc_first = {'version' : '10' , 'name' : self .tc_first }
You can’t perform that action at this time.
0 commit comments