Michael Stapelberg
e114b3dba2
Refactor the interface of commands.c
...
This change has two implications:
1) tree_render() will now be called precisely once for input which consists of
multiple commands (like "focus left; focus right"). Also, the caller of
parse_command() has to call it. This makes us able to fix tickets such as
ticket #608 (where multiple tree_render() calls are noticable).
2) The output of a command is now a JSON array of return values of the
individual subcommands. In the case of "focus left; focus right", this is:
[{"success":true}, {"success":true}]
While this is incompatible with what i3 returned before, the return value of
commands was undocumented and therefore not subject to our API stability.
2012-02-15 20:57:25 +00:00
Michael Stapelberg
efa1cada29
tests: Make i3 create its temporary files in /tmp/i3-testsuite
...
This behavior can be avoided by passing dont_create_temp_dir => 1 to
launch_with_config (or activate_i3).
This commit fixes t/159-socketpaths.t being flaky on non-systemd computers.
2012-02-07 17:38:45 -05:00
Michael Stapelberg
318d4fdeef
make in-place restarts use socket activation, too (for faster/less flaky tests)
2012-01-21 23:03:09 +00:00
Michael Stapelberg
6e4a86b7d1
tests: make focused_ws multi-monitor-safe, document it
2012-01-08 16:32:58 +00:00
Michael Stapelberg
3254188cda
Bugfix: Show scratchpad on the correct output (+test)
...
Fixes : #596
2012-01-07 16:53:37 +00:00
Michael Stapelberg
08986a1798
Implement scratchpad functionality (see userguide)
2011-12-21 23:15:32 +00:00
Michael Stapelberg
311b9e24df
tests: implement restart testing (actual option still missing)
2011-12-21 23:15:30 +00:00
Maik Fischer
9a7d7919a6
testcases: introduce TestWorker.pm
...
instead of executing a new perl interpreter (via TAP::Parser)
each time we start a testfile, fork a TestWorker for each display.
Each worker preloads i3test via 'require', blocking waits on its ipc
to get a new filename, forks itself upon arrival and 'do'es this
testscript.
2011-12-04 14:14:20 +01:00
Maik Fischer
8349190e09
testcases: always start i3 through i3test::launch_with_config
...
this will pave the way to just call BAIL_OUT and stop the currently
running testfile if i3 died for whatever reason.
2011-12-04 14:14:20 +01:00
Maik Fischer
475dc3c532
testcases: use open_window everywhere
2011-11-23 20:33:44 +00:00
Maik Fischer
ec877f2ec4
i3test.pm: add before_map hook to open_window
2011-11-23 20:33:44 +00:00
Maik Fischer
9b8d9f7303
i3test.pm: open_(floating_)window: take arguments as hashref or key-value list
2011-11-23 20:33:44 +00:00
Maik Fischer
372b98d08e
testcases: drop EV dependency
2011-11-23 00:03:00 +00:00
Maik Fischer
8d83697cc2
testcases: use Test::More is_deeply, don't depend on Test::Deep
2011-11-23 00:02:57 +00:00
Maik Fischer
3a9d94bba4
testcases: don't sync_with_i3() before $x->input_focus
...
since input_focus calls it anyways
2011-11-23 00:02:54 +00:00
Maik Fischer
0702f1fb7b
testcases: drop sync_with_i3()s $x parameter, use global
2011-11-23 00:02:50 +00:00
Maik Fischer
293517fb2e
testcases: drop open_floating_window()s $x parameter, use global
2011-11-23 00:02:47 +00:00
Maik Fischer
fce7570f96
testcases: drop open_window()s $x parameter, use global one instead
2011-11-21 23:51:04 +00:00
Maik Fischer
da403b3667
testcases: use $x in wait_for_(un)map change to wait_for_(un)map($win)
...
wait_for_unmap currently ignores its $window parameter, since
X11::XCB doesn't provide $event->{window} for unmap events yet.
2011-11-21 23:50:58 +00:00
Maik Fischer
65471a6b18
testcases: only export eq_deeply, cmp_deeply from Test::Deep
2011-11-21 23:50:55 +00:00
Maik Fischer
db6de84d0b
testcases: use global $x in wait_for_event, drop $x parameter
2011-11-21 23:50:48 +00:00
Maik Fischer
30ea33decb
testcases: let i3test.pm export $x, adapt testcases
2011-11-21 23:50:43 +00:00
Maik Fischer
1b1d7941ec
testcases: correctly enable lexical pragmata
...
eval 'package foo; use strict;' enables strict within eval, it does
not leak into the surrounding scope.
Also fix various warnings/compile errors found due to now enabled
strict and warnings.
2011-11-21 23:50:39 +00:00
Maik Fischer
0a65b770e8
i3test.pm: bail_out if injection of exported modules fails
2011-11-21 23:50:36 +00:00
Maik Fischer
e72899efb6
testcases: move i3test::X11 from 170-force_focus_wrapping.t into i3test.pm
2011-11-21 23:50:33 +00:00
Michael Stapelberg
33ee4679e7
tests: store temp configs in /tmp/
2011-11-16 21:41:45 +00:00
Michael Stapelberg
77a9e4b18f
complete-run: implement --strace, make --valgrind log to test-specific file
2011-11-15 23:30:17 +00:00
Michael Stapelberg
1c0d69d4e6
complete-run: implement --valgrind
2011-11-07 20:53:49 +00:00
Michael Stapelberg
389fdcf79f
complete-run: pass outdir (not only logpath) to activate_i3()
2011-11-07 20:52:14 +00:00
Maik Fischer
fce422d99e
i3test.pm: use strict; use warnings; and fix related bugs
2011-10-12 22:21:57 +01:00
Michael Stapelberg
3136573a70
tests: eliminate List::MoreUtils
2011-10-05 23:21:36 +01:00
Michael Stapelberg
b9224634dd
tests: eliminate Try::Tiny
2011-10-05 23:21:23 +01:00
Michael Stapelberg
b9cd9132d0
tests: remove unused Proc::Background
2011-10-05 20:48:34 +01:00
Michael Stapelberg
bd33c09845
tests: move i3test.pm from t/lib to lib/
2011-10-04 23:39:36 +01:00