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), ==, "");
}
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");
}
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
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
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);
{ "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}}