From 3c71ee0f28524a4a86e3a845c9dc6faadaf0f5ac Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Thu, 9 Jul 2009 19:14:37 -0600 Subject: silly me, @MSG -> @status_message --- tests/test-expand.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'tests') diff --git a/tests/test-expand.c b/tests/test-expand.c index dcbe7e3..0fd95d0 100644 --- a/tests/test-expand.c +++ b/tests/test-expand.c @@ -30,6 +30,13 @@ extern Uzbl uzbl; extern gchar* expand(char*, guint, gboolean); extern void make_var_to_name_hash(void); +void +test_keycmd (void) { + uzbl.state.keycmd = g_string_new("gg winslow"); + g_assert_cmpstr(expand("@keycmd", 0, FALSE), ==, "gg winslow"); + g_string_free(uzbl.state.keycmd, TRUE); +} + void test_uri (void) { g_assert_cmpstr(expand("@uri", 0, FALSE), ==, ""); @@ -71,13 +78,6 @@ test_NAME (void) { g_assert_cmpstr(expand("@NAME", 0, FALSE), ==, "testing"); } -void -test_KEYCMD (void) { - uzbl.state.keycmd = g_string_new("gg winslow"); - g_assert_cmpstr(expand("@KEYCMD", 0, FALSE), ==, "gg winslow"); - g_string_free(uzbl.state.keycmd, TRUE); -} - void test_MODE (void) { set_insert_mode(FALSE); @@ -88,9 +88,9 @@ test_MODE (void) { } void -test_MSG (void) { +test_status_message (void) { uzbl.gui.sbar.msg = "Hello from frosty Edmonton!"; - g_assert_cmpstr(expand("@MSG", 0, FALSE), ==, "Hello from frosty Edmonton!"); + g_assert_cmpstr(expand("@status_message", 0, FALSE), ==, "Hello from frosty Edmonton!"); } void @@ -198,11 +198,11 @@ test_escape_expansion (void) { void test_nested (void) { uzbl.gui.sbar.msg = "xxx"; - g_assert_cmpstr(expand("@<\"..@MSG..\">@", 0, FALSE), ==, "..xxx.."); - g_assert_cmpstr(expand("@<\"..\\@MSG..\">@", 0, FALSE), ==, "..@MSG.."); + g_assert_cmpstr(expand("@<\"..@status_message..\">@", 0, FALSE), ==, "..xxx.."); + g_assert_cmpstr(expand("@<\"..\\@status_message..\">@", 0, FALSE), ==, "..@status_message.."); - g_assert_cmpstr(expand("@(echo ..@MSG..)@", 0, FALSE), ==, "..xxx.."); - g_assert_cmpstr(expand("@(echo ..\\@MSG..)@", 0, FALSE), ==, "..@MSG.."); + g_assert_cmpstr(expand("@(echo ..@status_message..)@", 0, FALSE), ==, "..xxx.."); + g_assert_cmpstr(expand("@(echo ..\\@status_message..)@", 0, FALSE), ==, "..@status_message.."); } int @@ -210,15 +210,15 @@ main (int argc, char *argv[]) { g_type_init(); g_test_init(&argc, &argv, NULL); +// g_test_add_func("/test-expand/@keycmd", test_keycmd); + g_test_add_func("/test-expand/@status_message", test_status_message); g_test_add_func("/test-expand/@uri", test_uri); g_test_add_func("/test-expand/@LOAD_PROGRESS", test_LOAD_PROGRESS); g_test_add_func("/test-expand/@LOAD_PROGRESSBAR", test_LOAD_PROGRESSBAR); g_test_add_func("/test-expand/@TITLE", test_TITLE); g_test_add_func("/test-expand/@SELECTED_URI", test_SELECTED_URI); g_test_add_func("/test-expand/@NAME", test_NAME); -// g_test_add_func("/test-expand/@KEYCMD", test_KEYCMD); g_test_add_func("/test-expand/@MODE", test_MODE); - g_test_add_func("/test-expand/@MSG", test_MSG); g_test_add_func("/test-expand/@WEBKIT_*", test_WEBKIT_VERSION); g_test_add_func("/test-expand/@ARCH_UZBL", test_ARCH_UZBL); g_test_add_func("/test-expand/@COMMIT", test_COMMIT); -- cgit v1.2.3