changeset 3324:e5cc5e8b7021 trunk

additional tests
author William Pitcock <nenolod@atheme-project.org>
date Fri, 10 Aug 2007 20:10:13 -0500
parents c4402812b3e3
children 6f6f38157229
files src/tests/tuple_formatter_test.c
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/tests/tuple_formatter_test.c	Fri Aug 10 19:43:31 2007 -0500
+++ b/src/tests/tuple_formatter_test.c	Fri Aug 10 20:10:13 2007 -0500
@@ -130,6 +130,24 @@
     }
     g_free(tstr);
 
+    tuple_associate_string(tuple, "sheep", "");
+
+    tstr = tuple_formatter_process_string(tuple, "${?splork:${splork} - }${?sheep:${sheep} - }${splork}");
+    if (g_ascii_strcasecmp(tstr, "moo -  - moo"))
+    {
+        g_print("fail 13: '%s'\n", tstr);
+        return EXIT_FAILURE;
+    }
+    g_free(tstr);
+
+    tstr = tuple_formatter_process_string(tuple, "${?splork:${splork} - }${?sheep:${sheep} - }${splork}");
+    if (g_ascii_strcasecmp(tstr, "moo -  - moo"))
+    {
+        g_print("fail 14: '%s'\n", tstr);
+        return EXIT_FAILURE;
+    }
+    g_free(tstr);
+
     mowgli_object_unref(tuple);
 
     return EXIT_SUCCESS;