Added test for TeX includes with same name as subdirs.
[scons.git] / test / FindFile.py
index 2d680f865ba27ba1b8604d06ec5a9b7e597f6472..5d198ac634088674a0330f3c6c4ee1c824e549ec 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright (c) 2001, 2002 Steven Knight
+# __COPYRIGHT__
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -38,13 +38,14 @@ test.write(['bar', 'testfile1'], 'test 3\n')
 test.write(['bar', 'baz', 'testfile2'], 'test 4\n')
 
 test.write('SConstruct', """
+env = Environment(FILE = 'file', BAR = 'bar')
 file1 = FindFile('testfile1', [ 'foo', '.', 'bar', 'bar/baz' ])
 print open(str(file1), 'r').read()
-file2 = FindFile('testfile1', [ 'bar', 'foo', '.', 'bar/baz' ])
+file2 = env.FindFile('test${FILE}1', [ 'bar', 'foo', '.', 'bar/baz' ])
 print open(str(file2), 'r').read()
 file3 = FindFile('testfile2', [ 'foo', '.', 'bar', 'bar/baz' ])
 print open(str(file3), 'r').read()
-file4 = FindFile('testfile2', [ 'bar/baz', 'foo', '.', 'bar' ])
+file4 = env.FindFile('testfile2', [ '$BAR/baz', 'foo', '.', 'bar' ])
 print open(str(file4), 'r').read()
 """)
 
@@ -56,9 +57,14 @@ test 2
 
 test 4
 
-""", build_str = 'scons: "." is up to date.\n')
+""", build_str = "scons: `.' is up to date.\n")
 
 test.run(arguments = ".", stdout = expect)
 
 test.pass_test()
 
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4: