mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-27 19:38:55 +02:00
Output that test-markup is expected to produce when run on the valid
2006-05-28 Matthias Clasen <mclasen@redhat.com> * tests/markups/expected-*: Output that test-markup is expected to produce when run on the valid gmarkup examples. * tests/markup-test.c: Only dump the results of the first, unchunked parse, to compare it against the expected output. * tests/run-markup-tests.sh: For valid examples, compare the output of test-markup against the corresponding expected-<n> file.
This commit is contained in:
committed by
Matthias Clasen
parent
2585e9aadb
commit
c8922bb143
@@ -54,10 +54,10 @@ end_element_handler (GMarkupParseContext *context,
|
||||
--depth;
|
||||
indent (0);
|
||||
printf ("END '%s'\n", element_name);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
text_handler (GMarkupParseContext *context,
|
||||
text_handler (GMarkupParseContext *context,
|
||||
const gchar *text,
|
||||
gsize text_len,
|
||||
gpointer user_data,
|
||||
@@ -88,7 +88,7 @@ error_handler (GMarkupParseContext *context,
|
||||
fprintf (stderr, " %s\n", error->message);
|
||||
}
|
||||
|
||||
static GMarkupParser parser = {
|
||||
static const GMarkupParser parser = {
|
||||
start_element_handler,
|
||||
end_element_handler,
|
||||
text_handler,
|
||||
@@ -96,6 +96,14 @@ static GMarkupParser parser = {
|
||||
error_handler
|
||||
};
|
||||
|
||||
static const GMarkupParser silent_parser = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
error_handler
|
||||
};
|
||||
|
||||
static int
|
||||
test_in_chunks (const gchar *contents,
|
||||
gint length,
|
||||
@@ -104,7 +112,7 @@ test_in_chunks (const gchar *contents,
|
||||
GMarkupParseContext *context;
|
||||
int i = 0;
|
||||
|
||||
context = g_markup_parse_context_new (&parser, 0, NULL, NULL);
|
||||
context = g_markup_parse_context_new (&silent_parser, 0, NULL, NULL);
|
||||
|
||||
while (i < length)
|
||||
{
|
||||
|
Reference in New Issue
Block a user