From a61480db99ceba3aaf734c80de612adf0b1558f4 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 29 Nov 2010 11:21:33 +0100 Subject: [PATCH] tests: add cmd() function for typing less to get i3 to run a command --- testcases/t/lib/i3test.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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