Commit Graph

942 Commits

Author SHA1 Message Date
Michael Stapelberg 3a31a76b2a Reorder tests to not use the same number (#2947)
Distinct numbers make re-running individual tests easier by helping with
tab-completion.

Completeness verified using:
% for i in $(seq 0 600)
do
  files=$(ls testcases/t/$(printf "%03d" $i)-*.t 2>&- | wc -l)
  [ "$files" != "0" ] && [ "$files" != "1" ] && echo "clash: $i"
done
2017-09-14 17:49:02 +02:00
Michael Stapelberg a5aed10d09 tests: unflake t/257-keypress-group1-fallback.t (#2946)
fixes #2944
2017-09-14 17:48:37 +02:00
Michael Stapelberg b23e1f644f Bugfix: free incomplete containers when JSON parsing fails
related to #2755
2017-09-13 16:39:13 +02:00
Orestis Floros 7b0f4abf4f scalloc parse_config input to make sure it terminates with '\0'
Otherwise strchr() can crash for files that don't end with '\n' because
it won't find a null char to terminate at.

Fixes #2934
2017-09-13 15:31:53 +03:00
Orestis Floros fd7319683d Don't insert newline at end of config with launch_with_config 2017-09-13 15:30:37 +03:00
Vladimir Panteleev 9be4199e13
533-randr15.t: Add test for bar output name canonicalization 2017-09-13 08:23:27 +00:00
Vladimir Panteleev fbeded23a9
533-randr15.t: Stop hard-coding the output name
Refactor away all mentions of DP3.
2017-09-13 08:23:27 +00:00
Vladimir Panteleev 8a0e5f89f9
533-randr15.t: Add a fake output connected to the fake monitor
Add an output ID to the simulated RRGetMonitors reply, then add a
simulated RRGetOutputInfo reply describing the added output.
2017-09-13 08:23:27 +00:00
Vladimir Panteleev c6e3fbcf19
testcases/lib: Add inject_randr15_outputinfo argument
Allow tests to specify a file name for inject_randr15's
--getoutputinfo_reply command-line parameter.
2017-09-13 08:23:26 +00:00
Vladimir Panteleev de1b578f75
inject_randr1.5: Intercept X11 error responses in addition to replies
Allow clients to send garbage to the server, then intercept the
server's error response and substitute it with the supplied simulated
reply data.
2017-09-13 08:23:26 +00:00
Vladimir Panteleev f88f4fb5d4
inject_randr1.5: Add RRGetOutputInfo reply injection
Add a --getoutputinfo_reply switch to indicate a filename containing
the RRGetOutputInfo reply data to inject.
2017-09-13 08:23:26 +00:00
Vladimir Panteleev dfc5ad9850
inject_randr1.5: Refactor reading and storing reply buffer to a struct
Allows easier introduction of additional reply buffers in upcoming
changes.
2017-09-13 08:23:26 +00:00
Michael Stapelberg 1c94d189c3 tests: run 533-randr15.t at the very end
The test runs `xrandr setmonitor`, which will otherwise affect any test
scheduled after 533-randr15.t, causing flakyness in t/217-NET_CURRENT_DESKTOP.t
for example.
2017-09-10 21:03:14 +02:00
Michael Stapelberg 06e8f75d52 tests: unflake t/263-edge-borders.t 2017-09-10 21:03:14 +02:00
Michael Stapelberg bed5c9e03a tests: re-seed random number generator in workers 2017-09-10 21:03:13 +02:00
Michael Stapelberg 1b18f89422 Merge pull request #2923 from stapelberg/tests-split
Testsuite: avoid starting new i3 instances where possible
2017-09-10 13:41:46 +02:00
Michael Stapelberg f7565b5f32 Kill windows between tests 2017-09-10 11:31:10 +02:00
Michael Stapelberg 94c76d9e30 i3test: add kill_all_windows convenience function 2017-09-10 11:30:56 +02:00
Michael Stapelberg 6caf4e1cb5 testcases/Makefile.PL: tell MakeMaker this is a pure-Perl distribution (#2922)
fixes #2914
2017-09-10 11:25:43 +02:00
Michael Stapelberg 899ffd872f 529-net-wm-desktop: avoid timeout, avoid restarts, split
This shaves off almost half a second of the wall-clock time (from 5.9s to 5.6s).
2017-09-09 18:39:56 +02:00
Michael Stapelberg ffd0ebd85c 165-for_window: merge config and re-use i3 instance, split remainder
This reduces total test wall-clock time by 1.5s (from 7.5s down to 5.9s).
2017-09-09 18:21:59 +02:00
Michael Stapelberg c86307864f t/265-swap: don’t start new i3 instances with the same config
$config is never touched after being initially set up.
Not restarting i3 between each test case reduces the runtime of this test by an
order of magnitude.
2017-09-09 17:50:23 +02:00
Orestis Floros e5008ca0dc Improve 267-regress-mark-restart.t
Another window with a mark is needed for issue #2900.
2017-09-07 04:20:52 +03:00
Orestis b12cea0ad2 Fix typo in 265-swap.t 2017-09-06 18:02:52 +03:00
Orestis 66f2148236 Check if con_id exists in cmd_swap (#2898)
Also adds some testcases for swap using con_id.

Fixes #2895
2017-09-06 07:34:14 +02:00
Michael Stapelberg 4dca8e6e0b Respect focus_on_window_activation for ConfigureRequests (#2889)
fixes #2873
2017-08-28 12:07:56 +02:00
Michael Stapelberg c9676e0cdb t/264-keypress-numlock: add mouse binding test
fixes #2523
2017-08-20 18:00:58 +02:00
Michael Stapelberg 260bcf283f Respect dont_warp flag when moving containers (#2867)
fixes #2681
fixes #2592
2017-08-20 17:07:23 +02:00
Michael Stapelberg c70fa8078f Focus windows upon ConfigureWindow with stack-mode=Above (#2865)
fixes #2708
fixes #2745
2017-08-20 14:56:44 +02:00
Michael Stapelberg 1e349ae3e1 t/201-config-parser: update expected token list 2017-08-20 13:12:06 +02:00
Michael Stapelberg a6d8ed9b1a Introduce the GET_CONFIG IPC request
This introduces memory usage by one copy of the config file, which is an
acceptable trade-off for being able to easily revert data loss.
The default config is 6KB, user configs will be in the same ballpark.

fixes #2856
2017-08-19 19:08:51 +02:00
Michael Stapelberg a91544b5b3 testcases: remove external AnyEvent::I3 dependency 2017-08-19 18:13:19 +02:00
Michael Stapelberg 5738ea10bb t/171-config-migrate: escape braces for newer Perl versions 2017-08-19 17:45:37 +02:00
hwangcc23 cc4be41674 Fix 'rename workspace to tosomething'
This patch fixes the issue #2802 (https://github.com/i3/i3/issues/2802).

1). Revise the state machine for the 'rename workspace' command.
    These scenarios are considered:
    a). 'rename workspace to to bla'
        state transitions: RENAME -> RENAME_WORKSPACE -> RENAME_WORKSPACE_LIKELY_TO -> RENAME_WORKSPACE_LIKELY_TO_NEW_NAME
    b). 'rename workspace to tosomething'
        state transitions: RENAME -> RENAME_WORKSPACE -> RENAME_WORKSPACE_LIKELY_TO
    c). 'rename workspace to to'
        state transitions: RENAME -> RENAME_WORKSPACE -> RENAME_WORKSPACE_LIKELY_TO
    d). 'rename workspace to bla'
        state transitions: RENAME -> RENAME_WORKSPACE -> RENAME_WORKSPACE_LIKELY_TO
    e). 'rename workspace bla to foo'
        state transitions: RENAME -> RENAME_WORKSPACE -> RENAME_WORKSPACE_TO -> RENAME_WORKSPACE_TO_NEW_NAME

2). Add a test case in 117-workspace.t for the scenario b.
2017-06-12 22:21:21 +08:00
Michael Stapelberg a4f6387911 compare modifiers for equality, not subset (+test)
Subset comparison was introduced with the rather large commit
bf3cd41b5d, but I now think we should use
equality.

In other words, the following key binding:

    bindsym Mod4+x nop Mod4+x

previously would have been triggered when pressing Mod3+Mod4+x.

Strictly speaking, this is a change of behavior, but it breaks none of our
tests, and using equality instead of subset comparison enables more use-cases.

fixes #2002
2017-05-24 20:42:27 +02:00
Chih-Chyuan Hwang 13372d511a Fix the i3 crash caused by mark + restart commands (#2779)
This patch fixes the issue #2511(https://github.com/i3/i3/issues/2511).

1). Memorize the marks, but only call con_mark once the container has finished parsing. (Credit: This is @Airblader's patch.)

2). Add a test case 267-regress-mark-restart.t for regression test to check if mark and restart command crash i3.
2017-05-23 08:47:11 +02:00
Michael Stapelberg 2bd3639fbb Fix --release bindings broken by previous commit
fixes #2559
2017-05-23 08:28:56 +02:00
Michael Stapelberg 36f80f2de8 Apply numlock fallback to bindcode where necessary (#2781)
This was broken with commit d77d40173a

fixes #2559
2017-05-22 21:32:05 +02:00
Michael Stapelberg 6dd4252cd5 Merge pull request #2496 from Airblader/feature-917
Implement 'swap' command.
2017-05-15 21:35:10 +02:00
Ingo Bürk 5f9a5e8d7d Implement 'swap' command.
This patch introduces a new command 'swap' that swaps two containers so
that they assume each other's position and geometry.

fixes #917
2017-05-15 21:06:38 +02:00
Ingo Bürk d78fd8d91f Introduce --exclude-titlebar flag for mouse bindings. (#2703)
This introduces the flag --exclude-titlebar for mouse bindings which
allows bindings like

    bindsym --whole-window --border --exclude-titlebar button3 focus

fixes #2347
2017-05-02 09:08:42 +02:00
Mihai Coman 52ce8c803d Fix changing of root workspace layout from stacked/tabbed 2017-04-27 17:50:55 +03:00
Ingo Bürk dda2ef9716 Fixes a small mixup in the assertion description. (#2692)
relates to PR #2649
2017-02-23 23:36:31 -08:00
Ingo Bürk c474ddd782 Merge pull request #2649 from s3rb31/next
layout toggle: take any combination of layouts as arguments (continuation of #2476)
2017-02-24 00:58:19 +01:00
s3rb31 37658bd6d7 layout toggle: take any combination of layouts as arguments (#2649)
With this PR the 'layout toggle' command can be passed any
combination of valid layout keywords as arguments. They will
be activated one after another each time you issue the command,
advancing from left to right always selecting the layout after
the currently active layout or the leftmost layout if the active
layout is not in the argument list.

This PR also incorporates the feature request from #2476.
2017-02-24 00:34:18 +01:00
Tony Crisci a55733f719 Testcases: Check for required binaries (#2655)
Fail fast in case test binaries are not built and provide instructions
on how to build them.
2017-01-22 23:40:08 -08:00
Tony Crisci 04dcf42397 Add the ipc shutdown event (#2652)
This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a `restart` or `exit`
command. The `change` field indicates why the ipc is shutting down. It
can be either "restart" or "exit".

fixes #2318
2017-01-22 14:08:32 -08:00
Ingo Bürk f80cbf7872 Fix blinking test. (#2637)
Thanks to @sandsmark for figuring this out.
2017-01-13 09:34:28 -08:00
Ingo Bürk 14eea7fce5 Added support for _NET_MOVERESIZE_WINDOW. (#2634)
fixes #2603
2017-01-13 09:30:50 -08:00
Ingo Bürk a301396997 Respect minimum size hints for floating windows. (#2508)
This commit introduces proper support for the minimum size on floating
windows by ensuring that it is respected during mapping, later changes as
well as resizes.

Furthermore, this commit fixes minor issues with how the hints are handled
during calculations.

fixes #2436
2016-11-28 22:09:39 +01:00