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

Unified Diff: build_tools/filter_data_for_size_unittest.py

Issue 1000163003: Generate the icu data binaries at compile time instead of checking in binaries Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: Fixed warnings in cross compiling Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build_tools/filter_data_for_size.py ('k') | build_tools/run_without_cygwin.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build_tools/filter_data_for_size_unittest.py
diff --git a/build_tools/filter_data_for_size_unittest.py b/build_tools/filter_data_for_size_unittest.py
new file mode 100755
index 0000000000000000000000000000000000000000..e1c1afe6e78b98dfbbefe9df40b13982d589cfa9
--- /dev/null
+++ b/build_tools/filter_data_for_size_unittest.py
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Check that filter_data_for_size seems to work."""
+
+import cStringIO
+import unittest
+
+import filter_data_for_size
+
+
+class FilterTest(unittest.TestCase):
+
+ def testFixWordTxt(self):
+ test_input = cStringIO.StringIO("$ALetter-$dictionaryCJK")
+ test_output = cStringIO.StringIO()
+ filter_data_for_size._process_word_txt(test_input, test_output)
+ self.assertEqual(test_output.getvalue(), "$ALetter")
+
+ def testPrintBlock(self):
+ test_data = """\
+foo{aaa}
+"""
+ test_input = cStringIO.StringIO(test_data)
+ test_output = cStringIO.StringIO()
+ line = test_input.next()
+ filter_data_for_size._print_block(line, test_input, test_output)
+ self.assertEqual(test_output.getvalue(), test_data)
+
+if __name__ == '__main__':
+ unittest.main()
« no previous file with comments | « build_tools/filter_data_for_size.py ('k') | build_tools/run_without_cygwin.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698