From f25d19c0fa10451e17d577279d97afe4ba598674 Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Mon, 14 Feb 2011 23:31:41 -0700 Subject: fix a crash when executing a nonexistent command --- tests/test-command.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') 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); -- cgit v1.2.3