diff options
author | William Blevins <wblevins001@gmail.com> | 2017-03-01 01:42:59 (GMT) |
---|---|---|
committer | William Blevins <wblevins001@gmail.com> | 2017-03-01 01:42:59 (GMT) |
commit | 883c36995a2dc7d1b3c49e04b00aaf7af1dde4cd (patch) | |
tree | 53b71b445e3e933cdcfcae4c96498222afba9c14 /test/AS/fixture | |
parent | 35308fb1e42a1999f47f82543af8c74ff59c6455 (diff) | |
download | SCons-883c36995a2dc7d1b3c49e04b00aaf7af1dde4cd.zip SCons-883c36995a2dc7d1b3c49e04b00aaf7af1dde4cd.tar.gz SCons-883c36995a2dc7d1b3c49e04b00aaf7af1dde4cd.tar.bz2 |
Additional fixture cleanup for test/AS directory.
Diffstat (limited to 'test/AS/fixture')
-rw-r--r-- | test/AS/fixture/myas.py | 35 | ||||
-rw-r--r-- | test/AS/fixture/myas_args.py | 48 | ||||
-rw-r--r-- | test/AS/fixture/sconstest.skip | 0 |
3 files changed, 83 insertions, 0 deletions
diff --git a/test/AS/fixture/myas.py b/test/AS/fixture/myas.py new file mode 100644 index 0000000..bffae78 --- /dev/null +++ b/test/AS/fixture/myas.py @@ -0,0 +1,35 @@ +import sys + +if sys.platform == 'win32': + args = sys.argv[1:] + inf = None + while args: + a = args[0] + if a == '-o': + out = args[1] + args = args[2:] + continue + args = args[1:] + if not a[0] in "/-": + if not inf: + inf = a + continue + if a[:3] == '/Fo': out = a[3:] + infile = open(inf, 'rb') + outfile = open(out, 'wb') + for l in infile.readlines(): + if l[:3] != b'#as': + outfile.write(l) + sys.exit(0) + +else: + import getopt + opts, args = getopt.getopt(sys.argv[1:], 'co:') + for opt, arg in opts: + if opt == '-o': out = arg + infile = open(args[0], 'rb') + outfile = open(out, 'wb') + for l in infile.readlines(): + if l[:3] != b'#as': + outfile.write(l) + sys.exit(0) diff --git a/test/AS/fixture/myas_args.py b/test/AS/fixture/myas_args.py new file mode 100644 index 0000000..c7ca315 --- /dev/null +++ b/test/AS/fixture/myas_args.py @@ -0,0 +1,48 @@ +import sys + +if sys.platform == 'win32': + args = sys.argv[1:] + inf = None + optstring = '' + while args: + a = args[0] + if a == '-o': + out = args[1] + args = args[2:] + continue + args = args[1:] + if not a[0] in '/-': + if not inf: + inf = a + continue + if a[:2] == '/c': + continue + if a[:3] == '/Fo': + out = a[3:] + continue + optstring = optstring + ' ' + a + infile = open(inf, 'rb') + outfile = open(out, 'wb') + outfile.write(bytearray(optstring + "\n",'utf-8')) + for l in infile.readlines(): + if l[:3] != b'#as': + outfile.write(l) + sys.exit(0) +else: + import getopt + opts, args = getopt.getopt(sys.argv[1:], 'co:x') + optstring = '' + + for opt, arg in opts: + if opt == '-o': out = arg + else: optstring = optstring + ' ' + opt + + infile = open(args[0], 'rb') + outfile = open(out, 'wb') + outfile.write(bytearray(optstring + "\n",'utf-8')) + + for l in infile.readlines(): + if l[:3] != b'#as': + outfile.write(l) + + sys.exit(0) diff --git a/test/AS/fixture/sconstest.skip b/test/AS/fixture/sconstest.skip new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/AS/fixture/sconstest.skip |