diff options
author | Steven Knight <knight@baldmt.com> | 2003-04-30 19:38:19 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-04-30 19:38:19 (GMT) |
commit | 3387eab42442c7fe7ed0064de5b939497cc6df1b (patch) | |
tree | 3c34e3c08fe379c147c7166067d05a0a87fccaa6 /test/special-filenames.py | |
parent | 212d77d88aa4374ef13f2e6bc7edf3395ac9736c (diff) | |
download | SCons-3387eab42442c7fe7ed0064de5b939497cc6df1b.zip SCons-3387eab42442c7fe7ed0064de5b939497cc6df1b.tar.gz SCons-3387eab42442c7fe7ed0064de5b939497cc6df1b.tar.bz2 |
Test portability fixes for Cygwin. (Chad Austin)
Diffstat (limited to 'test/special-filenames.py')
-rw-r--r-- | test/special-filenames.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/test/special-filenames.py b/test/special-filenames.py index d152e52..2002b37 100644 --- a/test/special-filenames.py +++ b/test/special-filenames.py @@ -32,7 +32,7 @@ import TestSCons test = TestSCons.TestSCons() -file_names = [ +attempt_file_names = [ 'File with spaces', 'File"with"double"quotes', "File'with'single'quotes", @@ -49,17 +49,20 @@ file_names = [ "Combination '\"\n\\;<>?|*\t&" ] -if os.name == 'nt': - # Windows only supports spaces. - file_names = file_names[0:1] - test.write("cat.py", """\ import sys open(sys.argv[1], 'wb').write(open(sys.argv[2], 'rb').read()) """) -for fn in file_names: - test.write(fn + '.in', fn + '\n') +file_names = [] +for fn in attempt_file_names: + try: + test.write(fn + '.in', fn + '\n') + file_names.append(fn) + except IOError: + # if the Python interpreter can't handle it, don't bother + # testing to see if SCons can + pass def buildFileStr(fn): return "env.Build(source=r\"\"\"%s.in\"\"\", target=r\"\"\"%s.out\"\"\")" % ( fn, fn ) |