Index: grit/format/policy_templates/writers/reg_writer_unittest.py |
=================================================================== |
--- grit/format/policy_templates/writers/reg_writer_unittest.py (revision 177) |
+++ grit/format/policy_templates/writers/reg_writer_unittest.py (working copy) |
@@ -48,6 +48,20 @@ |
expected_output = 'Windows Registry Editor Version 5.00' |
self.CompareOutputs(output, expected_output) |
+ def testEmptyVersion(self): |
+ # Test the handling of an empty policy list. |
+ grd = self.PrepareTest( |
+ '{' |
+ ' "policy_definitions": [],' |
+ ' "placeholders": [],' |
+ ' "messages": {}' |
+ '}') |
+ output = self.GetOutput( |
+ grd, 'fr', {'_chromium': '1', 'version': '39.0.0.0' }, 'reg', 'en') |
+ expected_output = ('Windows Registry Editor Version 5.00\r\n' |
+ '; chromium version: 39.0.0.0\r\n') |
+ self.CompareOutputs(output, expected_output) |
+ |
def testMainPolicy(self): |
# Tests a policy group with a single policy of type 'main'. |
grd = self.PrepareTest( |