| OLD | NEW |
| 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 preprocessing of files. | 6 '''Unit test that checks preprocessing of files. |
| 7 Tests preprocessing by adding having the preprocessor | 7 Tests preprocessing by adding having the preprocessor |
| 8 provide the actual rctext data. | 8 provide the actual rctext data. |
| 9 ''' | 9 ''' |
| 10 | 10 |
| 11 import os | 11 import os |
| 12 import sys | 12 import sys |
| 13 if __name__ == '__main__': | 13 if __name__ == '__main__': |
| 14 sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), '..')) | 14 sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), '../..')) |
| 15 | 15 |
| 16 import unittest | 16 import unittest |
| 17 | 17 |
| 18 import grit.tool.preprocess_interface | 18 import grit.tool.preprocess_interface |
| 19 from grit.tool import rc2grd | 19 from grit.tool import rc2grd |
| 20 | 20 |
| 21 | 21 |
| 22 class PreProcessingUnittest(unittest.TestCase): | 22 class PreProcessingUnittest(unittest.TestCase): |
| 23 | 23 |
| 24 def testPreProcessing(self): | 24 def testPreProcessing(self): |
| (...skipping 15 matching lines...) Expand all Loading... |
| 40 DUMMY_STRING_1 "String 1" | 40 DUMMY_STRING_1 "String 1" |
| 41 // Some random description | 41 // Some random description |
| 42 DUMMY_STRING_2 "This text was added during preprocessing" | 42 DUMMY_STRING_2 "This text was added during preprocessing" |
| 43 END | 43 END |
| 44 ''' | 44 ''' |
| 45 return rctext | 45 return rctext |
| 46 | 46 |
| 47 if __name__ == '__main__': | 47 if __name__ == '__main__': |
| 48 unittest.main() | 48 unittest.main() |
| 49 | 49 |
| OLD | NEW |