diff options
Diffstat (limited to 'libs/gst/check')
-rw-r--r-- | libs/gst/check/Makefile.in | 2 | ||||
-rw-r--r-- | libs/gst/check/libcheck/Makefile.in | 2 | ||||
-rw-r--r-- | libs/gst/check/libcheck/check_print.c | 40 |
3 files changed, 40 insertions, 4 deletions
diff --git a/libs/gst/check/Makefile.in b/libs/gst/check/Makefile.in index 07201ac..444a04c 100644 --- a/libs/gst/check/Makefile.in +++ b/libs/gst/check/Makefile.in @@ -395,6 +395,7 @@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_DOCBOOK2HTML = @HAVE_DOCBOOK2HTML@ HAVE_DOCBOOK2PS = @HAVE_DOCBOOK2PS@ HAVE_DVIPS = @HAVE_DVIPS@ HAVE_EPSTOPDF = @HAVE_EPSTOPDF@ @@ -405,7 +406,6 @@ HAVE_PNGTOPNM = @HAVE_PNGTOPNM@ HAVE_PNMTOPS = @HAVE_PNMTOPS@ HAVE_PS2PDF = @HAVE_PS2PDF@ HAVE_XMLLINT = @HAVE_XMLLINT@ -HAVE_XSLTPROC = @HAVE_XSLTPROC@ HOST_CPU = @HOST_CPU@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ diff --git a/libs/gst/check/libcheck/Makefile.in b/libs/gst/check/libcheck/Makefile.in index cb3bccc..17a95df 100644 --- a/libs/gst/check/libcheck/Makefile.in +++ b/libs/gst/check/libcheck/Makefile.in @@ -324,6 +324,7 @@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_DOCBOOK2HTML = @HAVE_DOCBOOK2HTML@ HAVE_DOCBOOK2PS = @HAVE_DOCBOOK2PS@ HAVE_DVIPS = @HAVE_DVIPS@ HAVE_EPSTOPDF = @HAVE_EPSTOPDF@ @@ -334,7 +335,6 @@ HAVE_PNGTOPNM = @HAVE_PNGTOPNM@ HAVE_PNMTOPS = @HAVE_PNMTOPS@ HAVE_PS2PDF = @HAVE_PS2PDF@ HAVE_XMLLINT = @HAVE_XMLLINT@ -HAVE_XSLTPROC = @HAVE_XSLTPROC@ HOST_CPU = @HOST_CPU@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ diff --git a/libs/gst/check/libcheck/check_print.c b/libs/gst/check/libcheck/check_print.c index f170d60..e29aa7b 100644 --- a/libs/gst/check/libcheck/check_print.c +++ b/libs/gst/check/libcheck/check_print.c @@ -106,6 +106,38 @@ tr_fprint (FILE * file, TestResult * tr, enum print_output print_mode) } } +static void +fprint_xml_esc (FILE * file, const char *str) +{ + for (; *str != '\0'; str++) { + + switch (*str) { + + /* handle special characters that must be escaped */ + case '"': + fputs (""", file); + break; + case '\'': + fputs ("'", file); + break; + case '<': + fputs ("<", file); + break; + case '>': + fputs (">", file); + break; + case '&': + fputs ("&", file); + break; + + /* regular characters, print as is */ + default: + fputc (*str, file); + break; + } + } +} + void tr_xmlprint (FILE * file, TestResult * tr, enum print_output print_mode CK_ATTRIBUTE_UNUSED) @@ -147,8 +179,12 @@ tr_xmlprint (FILE * file, TestResult * tr, fprintf (file, " <fn>%s:%d</fn>\n", file_name, tr->line); fprintf (file, " <id>%s</id>\n", tr->tname); fprintf (file, " <iteration>%d</iteration>\n", tr->iter); - fprintf (file, " <description>%s</description>\n", tr->tcname); - fprintf (file, " <message>%s</message>\n", tr->msg); + fprintf (file, " <description>"); + fprint_xml_esc (file, tr->tcname); + fprintf (file, "</description>\n"); + fprintf (file, " <message>"); + fprint_xml_esc (file, tr->msg); + fprintf (file, "</message>\n"); fprintf (file, " </test>\n"); if (slash != NULL) { |