[Pkg-e-commits] [SCM] Enlightenment DR17 toolkit based (based on the EFL) branch, upstream-vcs, updated. 447de88121d145a078f1754a0cfebb704d363821

jethomas jethomas at alioth.debian.org
Sat Jun 7 18:33:48 UTC 2008


The following commit has been merged in the upstream-vcs branch:
commit 6b5bf543dcdf671931f09dd03063f1bb45c2eef3
Author: jethomas <jethomas>
Date:   Mon Apr 14 00:06:21 2008 +0000

    Add a unit test for bug 443.

diff --git a/src/bin/tests/text/ewl_text_test.c b/src/bin/tests/text/ewl_text_test.c
index cf44cbb..fc4acba 100644
--- a/src/bin/tests/text/ewl_text_test.c
+++ b/src/bin/tests/text/ewl_text_test.c
@@ -13,6 +13,7 @@ static void trigger_cb_mouse_in(Ewl_Widget *w, void *ev, void *data);
 static void trigger_cb(Ewl_Widget *w, void *ev, void *data);
 
 static int text_test_set_get(char *buf, int len);
+static int text_test_set_get_null(char *buf, int len);
 static int text_valid_utf8_set_get(char *buf, int len);
 static int text_invalid_utf8_set_get(char *buf, int len);
 
@@ -20,6 +21,7 @@ static Ewl_Unit_Test text_unit_tests[] = {
 		{"text set/get", text_test_set_get, NULL, -1, 0},
 		{"valid UTF-8 text set/get", text_valid_utf8_set_get, NULL, -1, 0},
 		{"invalid UTF-8 text set/get", text_invalid_utf8_set_get, NULL, -1, 0},
+		{"null text set/get", text_test_set_get_null, NULL, -1, 0},
 		{NULL, NULL, NULL, -1, 0}
 	};
 
@@ -229,6 +231,25 @@ text_test_set_get(char *buf, int len)
 }
 
 static int
+text_test_set_get_null(char *buf, int len)
+{
+	Ewl_Widget *o;
+	char *t;
+	int ret = 0;
+
+	o = ewl_text_new();
+	ewl_text_text_set(EWL_TEXT(o), "");
+	t = ewl_text_text_get(EWL_TEXT(o));
+
+	if (t)
+		LOG_FAILURE(buf, len, "text_get did not return null.");
+	else
+		ret = 1;
+
+	return ret;
+}
+
+static int
 text_valid_utf8_set_get(char *buf, int len)
 {
 	Ewl_Widget *t;

-- 
Enlightenment DR17 toolkit based (based on the EFL)



More information about the Pkg-e-commits mailing list