summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--ChangeLog.pre-2-1011
-rw-r--r--ChangeLog.pre-2-1211
-rw-r--r--ChangeLog.pre-2-411
-rw-r--r--ChangeLog.pre-2-611
-rw-r--r--ChangeLog.pre-2-811
-rw-r--r--tests/Makefile.am5
-rw-r--r--tests/patterntest.c41
8 files changed, 99 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 980ee9789..25d4f17a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2003-05-28 Matthias Clasen <maclas@gmx.de>
+
+ * tests/patterntest.c: Remain silent when sucessful.
+
+ * tests/Makefile.am: Add patterntest to make check. (113143)
+
+2003-05-27 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gstrfuncs.c (g_strdup): Use memcpy instead of
+ strcpy. (#106988, Christian Biere)
+
2003-05-27 Matthias Clasen <maclas@gmx.de>
* glib/gstrfuncs.c (g_strdup): Use memcpy instead of
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 980ee9789..25d4f17a5 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,14 @@
+2003-05-28 Matthias Clasen <maclas@gmx.de>
+
+ * tests/patterntest.c: Remain silent when sucessful.
+
+ * tests/Makefile.am: Add patterntest to make check. (113143)
+
+2003-05-27 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gstrfuncs.c (g_strdup): Use memcpy instead of
+ strcpy. (#106988, Christian Biere)
+
2003-05-27 Matthias Clasen <maclas@gmx.de>
* glib/gstrfuncs.c (g_strdup): Use memcpy instead of
diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12
index 980ee9789..25d4f17a5 100644
--- a/ChangeLog.pre-2-12
+++ b/ChangeLog.pre-2-12
@@ -1,3 +1,14 @@
+2003-05-28 Matthias Clasen <maclas@gmx.de>
+
+ * tests/patterntest.c: Remain silent when sucessful.
+
+ * tests/Makefile.am: Add patterntest to make check. (113143)
+
+2003-05-27 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gstrfuncs.c (g_strdup): Use memcpy instead of
+ strcpy. (#106988, Christian Biere)
+
2003-05-27 Matthias Clasen <maclas@gmx.de>
* glib/gstrfuncs.c (g_strdup): Use memcpy instead of
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 980ee9789..25d4f17a5 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,14 @@
+2003-05-28 Matthias Clasen <maclas@gmx.de>
+
+ * tests/patterntest.c: Remain silent when sucessful.
+
+ * tests/Makefile.am: Add patterntest to make check. (113143)
+
+2003-05-27 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gstrfuncs.c (g_strdup): Use memcpy instead of
+ strcpy. (#106988, Christian Biere)
+
2003-05-27 Matthias Clasen <maclas@gmx.de>
* glib/gstrfuncs.c (g_strdup): Use memcpy instead of
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 980ee9789..25d4f17a5 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,14 @@
+2003-05-28 Matthias Clasen <maclas@gmx.de>
+
+ * tests/patterntest.c: Remain silent when sucessful.
+
+ * tests/Makefile.am: Add patterntest to make check. (113143)
+
+2003-05-27 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gstrfuncs.c (g_strdup): Use memcpy instead of
+ strcpy. (#106988, Christian Biere)
+
2003-05-27 Matthias Clasen <maclas@gmx.de>
* glib/gstrfuncs.c (g_strdup): Use memcpy instead of
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 980ee9789..25d4f17a5 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,14 @@
+2003-05-28 Matthias Clasen <maclas@gmx.de>
+
+ * tests/patterntest.c: Remain silent when sucessful.
+
+ * tests/Makefile.am: Add patterntest to make check. (113143)
+
+2003-05-27 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gstrfuncs.c (g_strdup): Use memcpy instead of
+ strcpy. (#106988, Christian Biere)
+
2003-05-27 Matthias Clasen <maclas@gmx.de>
* glib/gstrfuncs.c (g_strdup): Use memcpy instead of
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2a3c2f893..cc4c7b2d2 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -49,7 +49,7 @@ endif
if ENABLE_TIMELOOP
timeloop = timeloop timeloop-closure
endif
-noinst_PROGRAMS = testglib patterntest testgdate testgdateparser unicode-normalize unicode-collate $(timeloop)
+noinst_PROGRAMS = testglib testgdate testgdateparser unicode-normalize unicode-collate $(timeloop)
testglib_LDADD = $(libglib)
patterntest_LDADD = $(libglib)
testgdate_LDADD = $(libglib)
@@ -73,6 +73,8 @@ test_programs = \
mainloop-test \
module-test \
node-test \
+ patterntest \
+ printf-test \
queue-test \
qsort-test \
rand-test \
@@ -118,6 +120,7 @@ markup_test_LDADD = $(progs_ldadd)
module_test_LDADD = $(module_ldadd) $(module_test_exp)
module_test_LDFLAGS = $(G_MODULE_LDFLAGS)
node_test_LDADD = $(progs_ldadd)
+printf_test_LDADD = $(progs_ldadd)
queue_test_LDADD = $(progs_ldadd)
qsort_test_LDADD = $(progs_ldadd)
rand_test_LDADD = $(progs_ldadd)
diff --git a/tests/patterntest.c b/tests/patterntest.c
index 81067cbb5..6780bced0 100644
--- a/tests/patterntest.c
+++ b/tests/patterntest.c
@@ -19,6 +19,7 @@
#undef G_DISABLE_ASSERT
#undef G_LOG_DOMAIN
+#undef NOISY
#include <string.h>
@@ -86,7 +87,9 @@ test_compilation (gchar *src,
{
GPatternSpec *spec;
+#ifdef NOISY
g_print ("compiling \"%s\" \t", utf8(src));
+#endif
spec = g_pattern_spec_new (src);
if (spec->match_type != match_type)
@@ -121,9 +124,11 @@ test_compilation (gchar *src,
return FALSE;
}
+#ifdef NOISY
g_print ("passed (%s: \"%s\")\n",
match_type_name (spec->match_type),
spec->pattern);
+#endif
return TRUE;
}
@@ -133,7 +138,9 @@ test_match (gchar *pattern,
gchar *string,
gboolean match)
{
+#ifdef NOISY
g_print ("matching \"%s\" against \"%s\" \t", utf8(string), utf8(pattern));
+#endif
if (g_pattern_match_simple (pattern, string) != match)
{
@@ -141,7 +148,9 @@ test_match (gchar *pattern,
return FALSE;
}
+#ifdef NOISY
g_print ("passed (%s)\n", match ? "match" : "nomatch");
+#endif
return TRUE;
}
@@ -154,7 +163,9 @@ test_equal (gchar *pattern1,
GPatternSpec *p2 = g_pattern_spec_new (pattern2);
gboolean equal = g_pattern_spec_equal (p1, p2);
+#ifdef NOISY
g_print ("comparing \"%s\" with \"%s\" \t", utf8(pattern1), utf8(pattern2));
+#endif
if (expected != equal)
{
@@ -163,8 +174,10 @@ test_equal (gchar *pattern1,
expected ? "!=" : "==",
match_type_name (p2->match_type), p2->pattern_length, utf8(p2->pattern));
}
+#ifdef NOISY
else
g_print ("passed (%s)\n", equal ? "equal" : "unequal");
+#endif
g_pattern_spec_free (p1);
g_pattern_spec_free (p2);
@@ -217,17 +230,17 @@ main (int argc, char** argv)
TEST_COMPILATION("*?*x", G_MATCH_ALL_TAIL, "x?*", 2);
TEST_COMPILATION("x*??", G_MATCH_ALL_TAIL, "??*x", 3);
- TEST_EQUAL ("*A?B*", "*A?B*", TRUE);
- TEST_EQUAL ("A*BCD", "A*BCD", TRUE);
- TEST_EQUAL ("ABCD*", "ABCD****", TRUE);
- TEST_EQUAL ("A1*", "A1*", TRUE);
- TEST_EQUAL ("*YZ", "*YZ", TRUE);
- TEST_EQUAL ("A1x", "A1x", TRUE);
- TEST_EQUAL ("AB*CD", "AB**CD", TRUE);
- TEST_EQUAL ("AB*?*CD", "AB*?CD", TRUE);
- TEST_EQUAL ("AB*?CD", "AB?*CD", TRUE);
- TEST_EQUAL ("AB*CD", "AB*?*CD", FALSE);
- TEST_EQUAL ("ABC*", "ABC?", FALSE);
+ TEST_EQUAL("*A?B*", "*A?B*", TRUE);
+ TEST_EQUAL("A*BCD", "A*BCD", TRUE);
+ TEST_EQUAL("ABCD*", "ABCD****", TRUE);
+ TEST_EQUAL("A1*", "A1*", TRUE);
+ TEST_EQUAL("*YZ", "*YZ", TRUE);
+ TEST_EQUAL("A1x", "A1x", TRUE);
+ TEST_EQUAL("AB*CD", "AB**CD", TRUE);
+ TEST_EQUAL("AB*?*CD", "AB*?CD", TRUE);
+ TEST_EQUAL("AB*?CD", "AB?*CD", TRUE);
+ TEST_EQUAL("AB*CD", "AB*?*CD", FALSE);
+ TEST_EQUAL("ABC*", "ABC?", FALSE);
TEST_MATCH("*x", "x", TRUE);
TEST_MATCH("*x", "xx", TRUE);
@@ -258,7 +271,11 @@ main (int argc, char** argv)
TEST_MATCH("ab*\xf6", "ab\xe4\xf6", TRUE);
TEST_MATCH("ab*\xf6", "aba\xf6x\xf6", TRUE);
+#ifdef NOISY
g_print ("\n%u tests passed, %u failed\n", passed, failed);
+#endif
- return 0;
+ return failed;
}
+
+