summaryrefslogtreecommitdiffstats
path: root/test/option-f.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-08-14 11:17:14 (GMT)
committerSteven Knight <knight@baldmt.com>2001-08-14 11:17:14 (GMT)
commit7884cffaf3380a66a999ae8db12e0418f96993c0 (patch)
tree98d0b177f9b53719dc070c00f52332f653b65049 /test/option-f.py
parent062cbfc18a81e3b0c4147c4ead7cebff5e18063f (diff)
downloadSCons-7884cffaf3380a66a999ae8db12e0418f96993c0.zip
SCons-7884cffaf3380a66a999ae8db12e0418f96993c0.tar.gz
SCons-7884cffaf3380a66a999ae8db12e0418f96993c0.tar.bz2
Clean up tests.
Diffstat (limited to 'test/option-f.py')
-rw-r--r--test/option-f.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/option-f.py b/test/option-f.py
new file mode 100644
index 0000000..e52532e
--- /dev/null
+++ b/test/option-f.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python
+
+__revision__ = "test/option-f.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import os.path
+
+test = TestCmd.TestCmd(program = 'scons.py',
+ workdir = '',
+ interpreter = 'python')
+
+test.subdir('subdir')
+
+subdir_BuildThis = os.path.join('subdir', 'Buildthis')
+
+test.write('SConscript', """
+import os
+print "SConscript " + os.getcwd()
+""")
+
+test.write(subdir_BuildThis, """
+import os
+print "subdir/BuildThis", os.getcwd()
+""")
+
+wpath = test.workpath()
+
+test.run(chdir = '.', arguments = '-f SConscript')
+test.fail_test(test.stdout() != ("SConscript %s\n" % wpath))
+
+test.run(chdir = '.', arguments = '-f ' + subdir_BuildThis)
+test.fail_test(test.stdout() != ("subdir/BuildThis %s\n" % wpath))
+
+test.pass_test()