1   
 2   
 3   
 4  from translate.storage import properties 
 5  from translate.storage import test_monolingual 
 6  from translate.misc import wStringIO 
 7   
 9      UnitClass = properties.propunit 
10   
12          """It doesn't seem that properties files can store double backslashes. 
13           
14          We are disabling the double-backslash tests for now. 
15          If we are mistaken in the above assumption, we need to fix getsource() 
16          and setsource() and delete this test override. 
17           
18          """ 
19          pass 
  20   
21 -class TestProp(test_monolingual.TestMonolingualStore): 
 22      StoreClass = properties.propfile 
23       
29   
31          """helper that converts properties source to propfile object and back""" 
32          return str(self.propparse(propsource)) 
 33   
42   
44          """checks that a simple properties definition can be regenerated as source""" 
45          propsource = 'test_me=I can code!' 
46          propregen = self.propregen(propsource) 
47          assert propsource + '\n' == propregen 
 48   
61   
63          """check that we preserver \n that appear at start and end of properties""" 
64          propsource = "newlines=\\ntext\\n" 
65          propregen = self.propregen(propsource) 
66          assert propsource + '\n' == propregen 
 67   
 75