From: Michael Stapelberg Date: Mon, 5 Sep 2011 20:24:28 +0000 (+0200) Subject: extend t/17-workspace.t to check if the numbers are assigned correctly X-Git-Tag: 4.1~170^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bf4d166330367b83e07b4656904c21d713984847;p=i3%2Fi3 extend t/17-workspace.t to check if the numbers are assigned correctly --- diff --git a/testcases/t/17-workspace.t b/testcases/t/17-workspace.t index 19e2df34..3c3b6cc6 100644 --- a/testcases/t/17-workspace.t +++ b/testcases/t/17-workspace.t @@ -98,4 +98,23 @@ cmd 'workspace "prev"'; ok(workspace_exists('prev'), 'workspace "prev" exists'); is(focused_ws(), 'prev', 'now on workspace prev'); +##################################################################### +# check that the numbers are assigned/recognized correctly +##################################################################### + +cmd "workspace 3: $tmp"; +my $ws = get_ws("3: $tmp"); +ok(defined($ws), "workspace 3: $tmp was created"); +is($ws->{num}, 3, 'workspace number is 3'); + +cmd "workspace 0: $tmp"; +my $ws = get_ws("0: $tmp"); +ok(defined($ws), "workspace 0: $tmp was created"); +is($ws->{num}, 0, 'workspace number is 0'); + +cmd "workspace aa: $tmp"; +my $ws = get_ws("aa: $tmp"); +ok(defined($ws), "workspace aa: $tmp was created"); +is($ws->{num}, -1, 'workspace number is -1'); + done_testing;