From 1d2e5fad17d7e396dc6b7f5748bffd2a23e80e25 Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Thu, 17 Feb 2011 12:56:56 -0700 Subject: update tests for new event escaping --- tests/test-command.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') 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); } -- cgit v1.2.3