Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: test/preparser/testcfg.py

Issue 6974009: Remove newlines from preparser command line parameters to make Windows happy. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2011 the V8 project authors. All rights reserved. 1 # Copyright 2011 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 executable, current_path, mode): 99 executable, current_path, mode):
100 pathname = join(self.root, filename + ".pyt") 100 pathname = join(self.root, filename + ".pyt")
101 source = open(pathname).read(); 101 source = open(pathname).read();
102 def Test(name, source, expectation): 102 def Test(name, source, expectation):
103 throws = None 103 throws = None
104 if (expectation is not None): 104 if (expectation is not None):
105 throws = [expectation] 105 throws = [expectation]
106 test = PreparserTestCase(self.root, 106 test = PreparserTestCase(self.root,
107 current_path + [filename, name], 107 current_path + [filename, name],
108 executable, 108 executable,
109 mode, throws, self.context, source) 109 mode, throws, self.context,
110 source.replace("\n", " "))
110 result.append(test) 111 result.append(test)
111 def Template(name, source): 112 def Template(name, source):
112 def MkTest(replacement, expectation): 113 def MkTest(replacement, expectation):
113 testname = name 114 testname = name
114 testsource = source 115 testsource = source
115 for key in replacement.keys(): 116 for key in replacement.keys():
116 testname = testname.replace("$"+key, replacement[key]); 117 testname = testname.replace("$"+key, replacement[key]);
117 testsource = testsource.replace("$"+key, replacement[key]); 118 testsource = testsource.replace("$"+key, replacement[key]);
118 Test(testname, testsource, expectation) 119 Test(testname, testsource, expectation)
119 return MkTest 120 return MkTest
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 status_file = join(self.root, 'preparser.status') 152 status_file = join(self.root, 'preparser.status')
152 if exists(status_file): 153 if exists(status_file):
153 test.ReadConfigurationInto(status_file, sections, defs) 154 test.ReadConfigurationInto(status_file, sections, defs)
154 155
155 def VariantFlags(self): 156 def VariantFlags(self):
156 return [[]]; 157 return [[]];
157 158
158 159
159 def GetConfiguration(context, root): 160 def GetConfiguration(context, root):
160 return PreparserTestConfiguration(context, root) 161 return PreparserTestConfiguration(context, root)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698