From: Michael Stapelberg Date: Mon, 29 Nov 2010 10:21:33 +0000 (+0100) Subject: tests: add cmd() function for typing less to get i3 to run a command X-Git-Tag: tree-pr1~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a61480db99ceba3aaf734c80de612adf0b1558f4;p=i3%2Fi3 tests: add cmd() function for typing less to get i3 to run a command --- diff --git a/testcases/t/lib/i3test.pm b/testcases/t/lib/i3test.pm index 83b48e11..79ca0266 100644 --- a/testcases/t/lib/i3test.pm +++ b/testcases/t/lib/i3test.pm @@ -10,7 +10,7 @@ use List::Util qw(first); use v5.10; use Exporter (); -our @EXPORT = qw(get_workspace_names get_unused_workspace get_ws_content get_ws get_focused open_empty_con open_standard_window); +our @EXPORT = qw(get_workspace_names get_unused_workspace get_ws_content get_ws get_focused open_empty_con open_standard_window cmd); BEGIN { my $window_count = 0; @@ -119,4 +119,8 @@ sub get_focused { return $lf; } +sub cmd { + i3("/tmp/nestedcons")->command(@_)->recv +} + 1