Lines Matching full:root
25 temp_file.write("<root></root>")
28 self.assertEqual(result, "<root></root>")
34 xmlpp.save_xml("<root></root>", temp_file_name)
52 xml_str = "<root>$(env.TEST_ENV_VAR)</root>"
53 expected = "<root>TestValue</root>"
60 xml_str = "<root>$(sys.ARCH)</root>"
61 expected = f"<root>{platform.architecture()[0]}</root>"
68 xml_str = "<root>$(var.USER)</root>"
69 expected = "<root></root>"
73 xml_str = "<?define USER=FOO?><root>$(var.USER)</root>"
74 expected = "<root>FOO</root>"
80 xml_str = "<root><?warning \"test warn\"?></root>"
81 expected = "<root></root>"
92 result = xpp.preprocess('<root><?cmd "echo hello world"?></root>')
93 self.assertEqual(result, "<root>hello world</root>")
102 '<root><?foreach x in a;b;c?>$(var.x)<?endforeach?></root>'
104 self.assertEqual(result, "<root>abc</root>")
108 result = xpp.preprocess('<root><?if True?>ok<?endif?></root>')
109 self.assertEqual(result, "<root>ok</root>")
110 result = xpp.preprocess('<root><?if False?>ok<?endif?></root>')
111 self.assertEqual(result, "<root></root>")
112 result = xpp.preprocess('<root><?if True?>ok<?else?>ko<?endif?></root>')
113 self.assertEqual(result, "<root>ok</root>")
114 result = xpp.preprocess('<root><?if False?>ok<?else?>ko<?endif?></root>')
115 self.assertEqual(result, "<root>ko</root>")
117 '<root><?if False?>ok<?elseif True?>ok2<?else?>ko<?endif?></root>'
119 self.assertEqual(result, "<root>ok2</root>")
121 '<root><?if False?>ok<?elseif False?>ok<?else?>ko<?endif?></root>'
123 self.assertEqual(result, "<root>ko</root>")
127 result = xpp.preprocess('<root><?ifdef USER?>ok<?else?>ko<?endif?></root>')
128 self.assertEqual(result, "<root>ko</root>")
130 '<?define USER=FOO?><root><?ifdef USER?>ok<?else?>ko<?endif?></root>'
132 self.assertEqual(result, "<root>ok</root>")