[gxml] XParser: Added test to write xmlns on element



commit 056554a8b765b7aebf26a6f1431fc980c096e251
Author: Daniel Espinosa <esodan gmail com>
Date:   Thu Nov 3 13:19:08 2016 -0600

    XParser: Added test to write xmlns on element
    
    With no attribute defining a namespace add it
    and check writing output

 test/GomDocumentTest.vala |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/test/GomDocumentTest.vala b/test/GomDocumentTest.vala
index 5b66b77..467b348 100644
--- a/test/GomDocumentTest.vala
+++ b/test/GomDocumentTest.vala
@@ -159,6 +159,9 @@ class GomDocumentTest : GXmlTest {
                                string s = doc.to_string ();
                                GLib.message (@"DOC: "+s);
                                assert ("<root xmlns=\"http://live.gnome.org/GXml\"/>" in s);
+                               doc.document_element.set_attribute_ns ("http://www.w3.org/2000/xmlns/";,
+                                                                                                             
                                                                          "xmlns",
+                                                                                                             
                                                                          "http://live.gnome.org/GXml";);
                        } catch (GLib.Error e) {
                                GLib.message ("Error: "+e.message);
                                assert_not_reached ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]