mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Add tests for the empty pattern.
2004-04-15 Matthias Clasen <mclasen@redhat.com> * tests/patterntest.c (main): Add tests for the empty pattern. * glib/gpattern.c (g_pattern_spec_new): Don't read and write out of bounds when the pattern is empty. (#140032, Stanislav Brabec, Stefan Fent)
This commit is contained in:
committed by
Matthias Clasen
parent
817f25b95b
commit
f4d9fcd8d4
@@ -273,6 +273,8 @@ main (int argc, char** argv)
|
||||
TEST_MATCH("ab*", "ab\xc3\xa4\xc3\xb6", TRUE);
|
||||
TEST_MATCH("ab*\xc3\xb6", "ab\xc3\xa4\xc3\xb6", TRUE);
|
||||
TEST_MATCH("ab*\xc3\xb6", "aba\xc3\xb6x\xc3\xb6", TRUE);
|
||||
TEST_MATCH("", "", TRUE);
|
||||
TEST_MATCH("", "abc", FALSE);
|
||||
|
||||
verbose ("\n%u tests passed, %u failed\n", passed, failed);
|
||||
|
||||
|
Reference in New Issue
Block a user