"""
Verify that we use a default target of the current directory when there
-are no command-line arguments (and, implicitly, no Default() in the
-SConstruct).
+is no Default() in the SConstruct file and there are no command-line
+arguments, or a null command-line argument.
"""
import os.path
test.write('SConstruct', r"""
def cat(env, source, target):
target = str(target[0])
- source = map(str, source)
+ source = list(map(str, source))
print 'cat(%s) > %s' % (source, target)
f = open(target, "wb")
for src in source:
test.write('aaa.in', "aaa.in\n")
+up_to_date = test.wrap_stdout("scons: `.' is up to date.\n")
+
#
test.run()
+test.must_match('aaa.out', "aaa.in\n")
+test.run(stdout=up_to_date)
-test.fail_test(test.read('aaa.out') != "aaa.in\n")
+#
+test.unlink('aaa.out')
+test.must_not_exist('aaa.out')
+
+#
+test.run([''])
+test.must_match('aaa.out', "aaa.in\n")
+test.run([''], stdout=up_to_date)
#
test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4: