key = key[1:-1]
try:
e = eval(key, globals, locals)
- if not e:
+ if e is None:
s = ''
elif is_List(e):
s = string.join(map(str, e), '\0')
"/bar/ack.cpp",
"../foo/ack.c" ]))
loc['xxx'] = None
+ loc['zero'] = 0
+ loc['one'] = 1
if os.sep == '/':
def cvt(str):
newcom = scons_subst("test $( $xxx $)", loc, {}, re.compile('\$[()]'))
assert newcom == cvt("test"), newcom
+ newcom = scons_subst("test $zero", loc, {})
+ assert newcom == cvt("test 0"), newcom
+
+ newcom = scons_subst("test $one", loc, {})
+ assert newcom == cvt("test 1"), newcom
+
newcom = scons_subst("test aXbXcXd", loc, {}, re.compile('X'))
assert newcom == cvt("test abcd"), newcom