def p_unparsed(self, p):
     '''unparsed : UNPARSEDCHUNK'''
     p[0] = Unparsed(p[1])
Esempio n. 2
0
 def testUnparsedList(self):
     text="Das ist nicht geparst"
     g=FoamFileGenerator([Unparsed(text),"nix"])
     self.assertEqual(str(g),"(\n  "+text+"\n  nix\n)\n")
Esempio n. 3
0
 def testUnparsedDict(self):
     text="Das ist nicht geparst"
     g=FoamFileGenerator({"a":Unparsed(text),"b":"nix"})
     self.assertEqual(str(g),"a "+text+";\nb nix;\n")
Esempio n. 4
0
 def testUnparsed(self):
     text="Das ist nicht geparst"
     g=FoamFileGenerator(Unparsed(text))
     self.assertEqual(str(g),text)