diff options
author | Havoc Pennington <hp@pobox.com> | 2000-10-27 02:46:04 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2000-10-27 02:46:04 +0000 |
commit | 32ef70d4b27ac912188a47b6611d5e8c0516cc2f (patch) | |
tree | 04cc4c82c2f8d29f72efa9c08523021f2823f979 /tests/run-markup-tests.sh | |
parent | 7ea09e45892c8239bd4d404463123592e6b3746d (diff) |
New module to parse a simple markup language
2000-10-24 Havoc Pennington <hp@pobox.com>
* gmarkup.h, gmarkup.c: New module to parse a simple
markup language
* Makefile.am: add gmarkup.h, gmarkup.c
* tests/Makefile.am: add markup-test
* gstring.h (g_string_new_len): new function to create a string
with a length
(g_string_new): avoid a gratuitous realloc
Diffstat (limited to 'tests/run-markup-tests.sh')
-rwxr-xr-x | tests/run-markup-tests.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/run-markup-tests.sh b/tests/run-markup-tests.sh new file mode 100755 index 000000000..a6c64d497 --- /dev/null +++ b/tests/run-markup-tests.sh @@ -0,0 +1,19 @@ +#! /bin/sh + +fail () +{ + echo "Test failed: $*" + exit 1 +} + +for I in markups/fail-*.gmarkup; do + echo "Parsing $I, should fail" + ./markup-test $I > /dev/null && fail "failed to generate error on $I" +done + +for I in markups/valid-*.gmarkup; do + echo "Parsing $I, should succeed" + ./markup-test $I > /dev/null || fail "failed on $I" +done + +echo "All tests passed."
\ No newline at end of file |