silly me, @MSG -> @status_message
authorBrendan Taylor <whateley@gmail.com>
Fri, 10 Jul 2009 01:14:37 +0000 (19:14 -0600)
committerBrendan Taylor <whateley@gmail.com>
Fri, 10 Jul 2009 01:14:37 +0000 (19:14 -0600)
tests/test-expand.c
uzbl.c

index dcbe7e3..0fd95d0 100644 (file)
@@ -31,6 +31,13 @@ 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), ==, "");
 
@@ -72,13 +79,6 @@ test_NAME (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_MODE (void) {
     set_insert_mode(FALSE);
     g_assert_cmpstr(expand("@MODE", 0, FALSE), ==, "C");
@@ -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);
diff --git a/uzbl.c b/uzbl.c
index d95dc8c..3e1aa75 100644 (file)
--- a/uzbl.c
+++ b/uzbl.c
@@ -166,7 +166,6 @@ const struct {
     { "TITLE",               PTR_C(uzbl.gui.main_title,             STR,       NULL)},
     { "SELECTED_URI",        PTR_C(uzbl.state.selected_url,         STR,       NULL)},
     { "MODE",                PTR_C(uzbl.gui.sbar.mode_indicator,    STR,       NULL)},
-    { "MSG",                 PTR_C(uzbl.gui.sbar.msg,               STR,       NULL)},
     { "NAME",                PTR_C(uzbl.state.instance_name,        STR,       NULL)},
 
     { NULL,                  {.ptr = NULL, .type = TYPE_INT, .dump = 0, .writeable = 0, .func = NULL}}