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

Side by Side Diff: grit/grit_runner_unittest.py

Issue 1442863002: Remove contents of grit's SVN repository. (Closed) Base URL: http://grit-i18n.googlecode.com/svn/trunk/
Patch Set: Created 5 years, 1 month 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/grit_runner.py ('k') | grit/lazy_re.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
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
4 # found in the LICENSE file.
5
6 '''Unit tests for grit.py'''
7
8 import os
9 import sys
10 if __name__ == '__main__':
11 sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
12
13 import unittest
14 import StringIO
15
16 from grit import util
17 import grit.grit_runner
18
19 class OptionArgsUnittest(unittest.TestCase):
20 def setUp(self):
21 self.buf = StringIO.StringIO()
22 self.old_stdout = sys.stdout
23 sys.stdout = self.buf
24
25 def tearDown(self):
26 sys.stdout = self.old_stdout
27
28 def testSimple(self):
29 grit.grit_runner.Main(['-i',
30 util.PathFromRoot('grit/testdata/simple-input.xml'),
31 '-d', 'test', 'bla', 'voff', 'ga'])
32 output = self.buf.getvalue()
33 self.failUnless(output.count('disconnected'))
34 self.failUnless(output.count("'test'") == 0) # tool name doesn't occur
35 self.failUnless(output.count('bla'))
36 self.failUnless(output.count('simple-input.xml'))
37
38
39 if __name__ == '__main__':
40 unittest.main()
OLDNEW
« no previous file with comments | « grit/grit_runner.py ('k') | grit/lazy_re.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698