extend t/17-workspace.t to check if the numbers are assigned correctly

This commit is contained in:
Michael Stapelberg 2011-09-05 22:24:28 +02:00
parent 8928b5f55d
commit bf4d166330
1 changed files with 19 additions and 0 deletions

View File

@ -98,4 +98,23 @@ cmd 'workspace "prev"';
ok(workspace_exists('prev'), 'workspace "prev" exists'); ok(workspace_exists('prev'), 'workspace "prev" exists');
is(focused_ws(), 'prev', 'now on workspace prev'); 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; done_testing;