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

Side by Side Diff: tools/grit/grit/xtb_reader_unittest.py

Issue 7269003: Change grit to depend on test data in the main repository. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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 | « tools/grit/grit/tool/transl2tc_unittest.py ('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 #!/usr/bin/python2.4 1 #!/usr/bin/python2.4
2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2008 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 tests for grit.xtb_reader''' 6 '''Unit tests for grit.xtb_reader'''
7 7
8 8
9 import os 9 import os
10 import sys 10 import sys
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 xtb_reader.Parse(xtb_file, grd.UberClique().GenerateXtbParserCallback('is')) 68 xtb_reader.Parse(xtb_file, grd.UberClique().GenerateXtbParserCallback('is'))
69 self.failUnless(clique_mega.MessageForLanguage('is').GetRealContent() == 69 self.failUnless(clique_mega.MessageForLanguage('is').GetRealContent() ==
70 'Meirihattar!') 70 'Meirihattar!')
71 self.failUnless(clique_hello_user.MessageForLanguage('is').GetRealContent() == 71 self.failUnless(clique_hello_user.MessageForLanguage('is').GetRealContent() ==
72 'Saelir %s') 72 'Saelir %s')
73 73
74 def testParseLargeFile(self): 74 def testParseLargeFile(self):
75 def Callback(id, structure): 75 def Callback(id, structure):
76 pass 76 pass
77 xtb = file(util.PathFromRoot('grit/test/data/fr.xtb')) 77 xtb = file(util.PathFromRoot('grit/testdata/generated_resources_fr.xtb'))
78 xtb_reader.Parse(xtb, Callback) 78 xtb_reader.Parse(xtb, Callback)
79 xtb.close() 79 xtb.close()
80 80
81 81
82 if __name__ == '__main__': 82 if __name__ == '__main__':
83 unittest.main() 83 unittest.main()
84
OLDNEW
« no previous file with comments | « tools/grit/grit/tool/transl2tc_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698