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

Side by Side Diff: grit/tool/postprocess_unittest.py

Issue 9958067: Fixing a bug in GRIT where messages with substitutions would (Closed) Base URL: https://grit-i18n.googlecode.com/svn/trunk
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « grit/tool/build_unittest.py ('k') | grit/tool/preprocess_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 '''Unit test that checks postprocessing of files. 6 '''Unit test that checks postprocessing of files.
7 Tests postprocessing by having the postprocessor 7 Tests postprocessing by having the postprocessor
8 modify the grd data tree, changing the message name attributes. 8 modify the grd data tree, changing the message name attributes.
9 ''' 9 '''
10 10
11 import os 11 import os
12 import re 12 import re
13 import sys 13 import sys
14 if __name__ == '__main__': 14 if __name__ == '__main__':
15 sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), '..')) 15 sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), '../..'))
16 16
17 import unittest 17 import unittest
18 18
19 import grit.tool.postprocess_interface 19 import grit.tool.postprocess_interface
20 from grit.tool import rc2grd 20 from grit.tool import rc2grd
21 21
22 22
23 class PostProcessingUnittest(unittest.TestCase): 23 class PostProcessingUnittest(unittest.TestCase):
24 24
25 def testPostProcessing(self): 25 def testPostProcessing(self):
(...skipping 28 matching lines...) Expand all
54 for node in messages.children: 54 for node in messages.children:
55 name_attr = node.attrs['name'] 55 name_attr = node.attrs['name']
56 m = smarter.search(name_attr) 56 m = smarter.search(name_attr)
57 if m: 57 if m:
58 node.attrs['name'] = 'SMART' + m.group(2) 58 node.attrs['name'] = 'SMART' + m.group(2)
59 return grdnode 59 return grdnode
60 60
61 if __name__ == '__main__': 61 if __name__ == '__main__':
62 unittest.main() 62 unittest.main()
63 63
OLDNEW
« no previous file with comments | « grit/tool/build_unittest.py ('k') | grit/tool/preprocess_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698