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

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

Issue 2840543002: [d8] implement console for d8. (Closed)
Patch Set: no stress Created 3 years, 8 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
« no previous file with comments | « test/message/console.out ('k') | 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 2008 the V8 project authors. All rights reserved. 1 # Copyright 2008 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 expected_lines.append(line) 100 expected_lines.append(line)
101 raw_lines = output.stdout.splitlines() 101 raw_lines = output.stdout.splitlines()
102 actual_lines = [ s for s in raw_lines if not self._IgnoreLine(s) ] 102 actual_lines = [ s for s in raw_lines if not self._IgnoreLine(s) ]
103 env = { "basename": os.path.basename(testpath + ".js") } 103 env = { "basename": os.path.basename(testpath + ".js") }
104 if len(expected_lines) != len(actual_lines): 104 if len(expected_lines) != len(actual_lines):
105 return True 105 return True
106 for (expected, actual) in itertools.izip_longest( 106 for (expected, actual) in itertools.izip_longest(
107 expected_lines, actual_lines, fillvalue=''): 107 expected_lines, actual_lines, fillvalue=''):
108 pattern = re.escape(expected.rstrip() % env) 108 pattern = re.escape(expected.rstrip() % env)
109 pattern = pattern.replace("\\*", ".*") 109 pattern = pattern.replace("\\*", ".*")
110 pattern = pattern.replace("\\{NUMBER\\}", "\d(?:\.\d*)?")
110 pattern = "^%s$" % pattern 111 pattern = "^%s$" % pattern
111 if not re.match(pattern, actual): 112 if not re.match(pattern, actual):
112 return True 113 return True
113 return False 114 return False
114 115
115 def StripOutputForTransmit(self, testcase): 116 def StripOutputForTransmit(self, testcase):
116 pass 117 pass
117 118
118 119
119 def GetSuite(name, root): 120 def GetSuite(name, root):
120 return MessageTestSuite(name, root) 121 return MessageTestSuite(name, root)
OLDNEW
« no previous file with comments | « test/message/console.out ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698