Send proper error messages upon parser failures, use yajl for generating command replies

Fixes: #693
This commit is contained in:
Michael Stapelberg
2012-05-02 22:01:50 +02:00
parent 87cb664236
commit bbe607899c
8 changed files with 192 additions and 108 deletions

View File

@ -63,4 +63,12 @@ cmd 'move gibberish' for (0 .. 10);
does_i3_live;
################################################################################
# regression test: an invalid command should come back with an error.
################################################################################
my $reply = cmd 'bullshit-command-which-we-never-implement meh';
is(scalar @$reply, 1, 'got one command reply');
ok(!$reply->[0]->{success}, 'reply has success == false');
done_testing;