glib/tests/run-markup-tests.sh
Matthias Clasen 60f59976d9 New testcases.
2002-05-18  Matthias Clasen  <maclas@gmx.de>

	* tests/markups/fail-36.gmarkup:
	* tests/markups/fail-35.gmarkup:
	* tests/markups/valid-8.gmarkup:
	* tests/markups/valid-7.gmarkup:
	* tests/markups/valid-6.gmarkup:
	* tests/markups/valid-5.gmarkup: New testcases.

	* tests/markup-test.c (passthrough_handler):
	(text_handler): Don't ignore the text_len parameter.

	* glib/gmarkup.c (find_current_text_end): Don't hang on embedded
	nuls.  (#81977)
	(g_markup_parse_context_parse): Fix passthrough handling to
	correctly skip processing instructions, comments, doctype
	declarations and CDATA marked sections.  (#81977)
2002-05-18 22:06:54 +00:00

23 lines
449 B
Bash
Executable File

#! /bin/sh
fail ()
{
echo "Test failed: $*"
exit 1
}
for I in $srcdir/markups/fail-*.gmarkup; do
echo "Parsing $I, should fail"
./markup-test $I > /dev/null && fail "failed to generate error on $I"
if test "$?" != "1"; then
fail "unexpected error on $I"
fi
done
for I in $srcdir/markups/valid-*.gmarkup; do
echo "Parsing $I, should succeed"
./markup-test $I > /dev/null || fail "failed on $I"
done
echo "All tests passed."