aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2011-11-28 20:51:56 -0700
committerGravatar Brendan Taylor <whateley@gmail.com>2011-11-28 20:51:56 -0700
commitb4bf5fa304f374680892174575aa01d7bcc94c1e (patch)
tree5dfa280f0bda433df72b808c6a98f216797942db /tests
parent83c4ba38435b494e5fda968b83d1dc1d145eea3b (diff)
don't segfault when toggling a nonexistent variable
Diffstat (limited to 'tests')
-rw-r--r--tests/test-command.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test-command.c b/tests/test-command.c
index b3c3d0c..2d91b64 100644
--- a/tests/test-command.c
+++ b/tests/test-command.c
@@ -351,6 +351,12 @@ test_toggle_string (void) {
// and wrap to the first value when it reaches the end.
parse_cmd_line("toggle useragent 'x' 'y'", NULL);
g_assert_cmpstr("x", ==, uzbl.net.useragent);
+
+ // user-defined variables can be toggled too.
+ parse_cmd_line("toggle new_variable 'x' 'y'", NULL);
+ gchar *value = get_var_value_string("new_variable");
+ g_assert_cmpstr("x", ==, value);
+ g_free(value);
}
int