@@ -22,14 +22,14 @@ def __init__(self, *args, **kwargs):
2222
2323class TestEnvironment (unittest .TestCase ):
2424 def test_auto_substs (self ):
25- '''Test the automatically set values of ACDEFINES, ALLDEFINES
26- and ALLSUBSTS .
25+ '''Test the automatically set values of ACDEFINES, ALLDEFINES,
26+ ALLSUBSTS and ALLEMPTYSUBSTS .
2727 '''
2828 env = ConfigEnvironment ('.' , '.' ,
2929 defines = [ ('foo' , 'bar' ), ('baz' , 'qux 42' ),
3030 ('abc' , 'def' ), ('extra' , 'foobar' ) ],
3131 non_global_defines = ['extra' , 'ignore' ],
32- substs = [ ('FOO' , 'bar' ), ('ABC' , 'def' ),
32+ substs = [ ('FOO' , 'bar' ), ('FOOBAR' , '' ), ( ' ABC' , 'def' ),
3333 ('bar' , 'baz qux' ), ('zzz' , '"abc def"' ),
3434 ('qux' , '' ) ])
3535 # non_global_defines should be filtered out in ACDEFINES and
@@ -47,6 +47,9 @@ def test_auto_substs(self):
4747FOO = bar
4848bar = baz qux
4949zzz = "abc def"''' )
50+ # ALLEMPTYSUBSTS contains all substs with no value.
51+ self .assertEqual (env .substs ['ALLEMPTYSUBSTS' ], '''FOOBAR =
52+ qux =''' )
5053
5154 def test_config_file (self ):
5255 '''Test the creation of config files.
0 commit comments