--- embedaddon/libxml2/doc/examples/testWriter.c 2012/02/21 23:37:59 1.1.1.1 +++ embedaddon/libxml2/doc/examples/testWriter.c 2014/06/15 19:53:37 1.1.1.3 @@ -7,7 +7,7 @@ * do encoding string conversions too. The resulting * documents are then serialized. * usage: testWriter - * test: testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res + * test: testWriter && for i in 1 2 3 4 ; do diff $(srcdir)/writer.xml writer$$i.tmp || break ; done * author: Alfred Mickautsch * copy: see Copyright for the status of this software. */ @@ -37,16 +37,16 @@ main(void) LIBXML_TEST_VERSION /* first, the file version */ - testXmlwriterFilename("writer1.res"); + testXmlwriterFilename("writer1.tmp"); /* next, the memory version */ - testXmlwriterMemory("writer2.res"); + testXmlwriterMemory("writer2.tmp"); /* next, the DOM version */ - testXmlwriterDoc("writer3.res"); + testXmlwriterDoc("writer3.tmp"); /* next, the tree version */ - testXmlwriterTree("writer4.res"); + testXmlwriterTree("writer4.tmp"); /* * Cleanup function for the XML library. @@ -160,7 +160,7 @@ testXmlwriterFilename(const char *uri) /* Write an element named "X_ORDER_ID" as child of HEADER. */ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "X_ORDER_ID", - "%010d", 53535L); + "%010d", 53535); if (rc < 0) { printf ("testXmlwriterFilename: Error at xmlTextWriterWriteFormatElement\n"); @@ -439,7 +439,7 @@ testXmlwriterMemory(const char *file) /* Write an element named "X_ORDER_ID" as child of HEADER. */ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "X_ORDER_ID", - "%010d", 53535L); + "%010d", 53535); if (rc < 0) { printf ("testXmlwriterMemory: Error at xmlTextWriterWriteFormatElement\n"); @@ -468,7 +468,7 @@ testXmlwriterMemory(const char *file) /* Write an element named "NAME_2" as child of HEADER. */ tmp = ConvertInput("Jörg", MY_ENCODING); rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_2", tmp); - + if (rc < 0) { printf ("testXmlwriterMemory: Error at xmlTextWriterWriteElement\n"); @@ -709,7 +709,7 @@ testXmlwriterDoc(const char *file) /* Write an element named "X_ORDER_ID" as child of HEADER. */ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "X_ORDER_ID", - "%010d", 53535L); + "%010d", 53535); if (rc < 0) { printf ("testXmlwriterDoc: Error at xmlTextWriterWriteFormatElement\n"); @@ -975,7 +975,7 @@ testXmlwriterTree(const char *file) /* Write an element named "X_ORDER_ID" as child of HEADER. */ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "X_ORDER_ID", - "%010d", 53535L); + "%010d", 53535); if (rc < 0) { printf ("testXmlwriterTree: Error at xmlTextWriterWriteFormatElement\n");