#!/usr/bin/env python
#
-# Copyright (c) 2001, 2002, 2003 Steven Knight
+# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+"""
+Verify that we use a default target of the current directory when there
+is no Default() in the SConstruct file and there are no command-line
+arguments, or a null command-line argument.
+"""
+
import os.path
import TestSCons
test.write('aaa.in', "aaa.in\n")
+up_to_date = test.wrap_stdout("scons: `.' is up to date.\n")
+
#
-test.run(arguments = '.')
+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(status = 2, stderr =
-"scons: *** No targets specified and no Default() targets found. Stop.\n")
+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: