Source

SCons / test / FindFile.py

Diff from to

test/FindFile.py

 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()
 """)
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.