aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test-command.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-command.c')
-rw-r--r--tests/test-command.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/test-command.c b/tests/test-command.c
index 769a1a9..49f3bb8 100644
--- a/tests/test-command.c
+++ b/tests/test-command.c
@@ -178,9 +178,9 @@ test_set_variable (struct EventFixture *ef, const void *data) {
(void) data;
/* set a string */
- parse_cmd_line("set status_message = A Simple Testing Message", NULL);
- ASSERT_EVENT(ef, "VARIABLE_SET status_message str A Simple Testing Message");
- g_assert_cmpstr("A Simple Testing Message", ==, uzbl.gui.sbar.msg);
+ parse_cmd_line("set useragent = Uzbl browser kthxbye!", NULL);
+ ASSERT_EVENT(ef, "VARIABLE_SET useragent str Uzbl browser kthxbye!");
+ g_assert_cmpstr("Uzbl browser kthxbye!", ==, uzbl.net.useragent);
/* set an int */
parse_cmd_line("set forward_keys = 0", NULL);
@@ -306,9 +306,9 @@ test_js (void) {
g_assert_cmpstr("X345", ==, result->str);
/* uzbl commands can be run from javascript */
- uzbl.gui.sbar.msg = "Test message";
- parse_cmd_line("js Uzbl.run('print @status_message').toUpperCase();", result);
- g_assert_cmpstr("TEST MESSAGE", ==, result->str);
+ uzbl.net.useragent = "Test useragent";
+ parse_cmd_line("js Uzbl.run('print @useragent').toUpperCase();", result);
+ g_assert_cmpstr("TEST USERAGENT", ==, result->str);
g_string_free(result, TRUE);
}
@@ -330,8 +330,8 @@ test_run_handler_arg_order (void) {
void
test_run_handler_expand (void) {
- uzbl.gui.sbar.msg = "Test message";
- run_handler("sync_spawn echo @status_message", "result:");
+ uzbl.net.useragent = "Test uzbl uzr agent";
+ run_handler("sync_spawn echo @useragent", "result:");
assert(uzbl.comm.sync_stdout);
@@ -340,7 +340,7 @@ test_run_handler_expand (void) {
/* the rest of the result should be the arguments passed to run_handler. */
/* the user-specified arguments to the handler should have been expanded */
- g_assert_cmpstr("result: Test message\n", ==, rest);
+ g_assert_cmpstr("result: Test uzbl uzr agent\n", ==, rest);
}
int