1 /* -*- c-basic-offset: 4; -*- */
6 #include <gdk/gdkkeysyms.h>
7 #include <sys/socket.h>
11 #include <sys/utsname.h>
13 #include <webkit/webkit.h>
14 #include <libsoup/soup.h>
15 #include <JavaScriptCore/JavaScript.h>
32 add_binding("insert", "set insert_mode = 1");
33 add_binding("command", "set insert_mode = 0");
35 /* the 'keycmd' command */
36 parse_command("keycmd", "insert", NULL);
38 g_assert_cmpint(1, ==, uzbl.behave.insert_mode);
39 g_assert_cmpstr("", ==, uzbl.state.keycmd);
41 /* setting the keycmd variable directly, equivalent to the 'keycmd' comand */
42 set_var_value("keycmd", "command");
44 g_assert_cmpint(0, ==, uzbl.behave.insert_mode);
45 g_assert_cmpstr("", ==, uzbl.state.keycmd);
49 main (int argc, char *argv[]) {
51 g_test_init(&argc, &argv, NULL);
53 g_test_add_func("/test-command/keycmd", test_keycmd);
55 initialize(argc, argv);
60 /* vi: set et ts=4: */