aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2011-02-14 23:31:41 -0700
committerGravatar Brendan Taylor <whateley@gmail.com>2011-02-14 23:32:17 -0700
commitf25d19c0fa10451e17d577279d97afe4ba598674 (patch)
treefb8ea620d29d1ad07c427b67c45db4793d01946a /tests
parent99961c4561f478523048ed69b37b37c432c42b8a (diff)
fix a crash when executing a nonexistent command
Diffstat (limited to 'tests')
-rw-r--r--tests/test-command.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test-command.c b/tests/test-command.c
index d07bf79..6d3d81e 100644
--- a/tests/test-command.c
+++ b/tests/test-command.c
@@ -297,6 +297,12 @@ test_last_result (void) {
g_string_free(result, TRUE);
}
+void
+test_no_such_command (void) {
+ parse_cmd_line("no-such-command", NULL);
+ /* if we didn't crash then we're ok! */
+}
+
int
main (int argc, char *argv[]) {
/* set up tests */
@@ -315,6 +321,8 @@ main (int argc, char *argv[]) {
g_test_add_func("/test-command/last-result", test_last_result);
+ g_test_add_func("/test-command/no-such-command", test_no_such_command);
+
/* set up uzbl */
initialize(argc, argv);