aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2011-02-17 12:56:56 -0700
committerGravatar Brendan Taylor <whateley@gmail.com>2011-02-17 12:56:56 -0700
commit1d2e5fad17d7e396dc6b7f5748bffd2a23e80e25 (patch)
treea7f284c27c233cba4574a7768e2bc74df9f684c2 /tests
parent3cb9af3b4457f5c6aec1eae2acf552aad8a3e6db (diff)
update tests for new event escaping
Diffstat (limited to 'tests')
-rw-r--r--tests/test-command.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test-command.c b/tests/test-command.c
index 6d3d81e..55bf316 100644
--- a/tests/test-command.c
+++ b/tests/test-command.c
@@ -152,7 +152,7 @@ test_set_variable (struct EventFixture *ef, const void *data) {
/* set a string */
parse_cmd_line("set useragent = Uzbl browser kthxbye!", NULL);
- ASSERT_EVENT(ef, "VARIABLE_SET useragent str Uzbl browser kthxbye!");
+ ASSERT_EVENT(ef, "VARIABLE_SET useragent str 'Uzbl browser kthxbye!'");
g_assert_cmpstr("Uzbl browser kthxbye!", ==, uzbl.net.useragent);
/* set an int */
@@ -168,7 +168,7 @@ test_set_variable (struct EventFixture *ef, const void *data) {
parse_cmd_line(g_string_free(cmd, FALSE), NULL);
ev = g_string_new("EVENT [" INSTANCE_NAME "] VARIABLE_SET zoom_level float ");
- g_string_append_printf(ev, "%f\n", 0.25);
+ g_string_append_printf(ev, "%.2f\n", 0.25);
read_event(ef);
g_assert_cmpstr(g_string_free(ev, FALSE), ==, ef->event_buffer);
@@ -188,13 +188,13 @@ test_set_variable (struct EventFixture *ef, const void *data) {
/* set a custom variable */
parse_cmd_line("set nonexistant_variable = Some Value", NULL);
- ASSERT_EVENT(ef, "VARIABLE_SET nonexistant_variable str Some Value");
+ ASSERT_EVENT(ef, "VARIABLE_SET nonexistant_variable str 'Some Value'");
uzbl_cmdprop *c = g_hash_table_lookup(uzbl.comm.proto_var, "nonexistant_variable");
g_assert_cmpstr("Some Value", ==, *c->ptr.s);
/* set a custom variable with expansion */
parse_cmd_line("set an_expanded_variable = Test @(echo expansion)@", NULL);
- ASSERT_EVENT(ef, "VARIABLE_SET an_expanded_variable str Test expansion");
+ ASSERT_EVENT(ef, "VARIABLE_SET an_expanded_variable str 'Test expansion'");
c = g_hash_table_lookup(uzbl.comm.proto_var, "an_expanded_variable");
g_assert_cmpstr("Test expansion", ==, *c->ptr.s);
}