#!perl # vim:ts=4:sw=4:expandtab # # Please read the following documents before working on tests: # • https://build.i3wm.org/docs/testsuite.html # (or docs/testsuite) # # • https://build.i3wm.org/docs/lib-i3test.html # (alternatively: perldoc ./testcases/lib/i3test.pm) # # • https://build.i3wm.org/docs/ipc.html # (or docs/ipc) # # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf # (unless you are already familiar with Perl) # # Ensures that 'move workspace $new, floating enable' on a marked window # leaves the window centered on the new workspace. # Bug still in: 4.10.2-137-ga4f0ed6 use i3test i3_config => <rect; is(int($pos->{x} + $pos->{width} / 2), int($x->root->rect->width / 2), 'x coordinates match'); is(int($pos->{y} + $pos->{height} / 2), int($x->root->rect->height / 2), 'y coordinates match'); done_testing;