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

Unified Diff: native_client_sdk/src/build_tools/tests/easy_template_test.py

Issue 250773010: [NaCl SDK] easy_template: fix bug when using % in an expression template. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix % after {{}} bug Created 6 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 | « native_client_sdk/src/build_tools/easy_template.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/build_tools/tests/easy_template_test.py
diff --git a/native_client_sdk/src/build_tools/tests/easy_template_test.py b/native_client_sdk/src/build_tools/tests/easy_template_test.py
index 3576208cb1fcc5cd7c03c32f975abfc299b216b8..56017045c80fca8c6728359def3fadf8b4c94b9b 100755
--- a/native_client_sdk/src/build_tools/tests/easy_template_test.py
+++ b/native_client_sdk/src/build_tools/tests/easy_template_test.py
@@ -109,6 +109,13 @@ struct Foo {
{'name': 'name', 'type': 'std::string'},
{'name': 'problems', 'type': 'array', 'basetype': 'int', 'size': 99}]})
+ def testModulo(self):
+ self._RunTest('No expression %', 'No expression %', {})
+ self._RunTest('% before {{3 + 4}}', '% before 7', {})
+ self._RunTest('{{2**8}} % after', '256 % after', {})
+ self._RunTest('inside {{8 % 3}}', 'inside 2', {})
+ self._RunTest('Everywhere % {{8 % 3}} %', 'Everywhere % 2 %', {})
+
if __name__ == '__main__':
unittest.main()
« no previous file with comments | « native_client_sdk/src/build_tools/easy_template.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698