]> git.sur5r.net Git - i3/i3/blob - testcases/t/300-restart-non-utf8.t
Update ewmh focused only when new focus is different (#3496)
[i3/i3] / testcases / t / 300-restart-non-utf8.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Please read the following documents before working on tests:
5 # • https://build.i3wm.org/docs/testsuite.html
6 #   (or docs/testsuite)
7 #
8 # • https://build.i3wm.org/docs/lib-i3test.html
9 #   (alternatively: perldoc ./testcases/lib/i3test.pm)
10 #
11 # • https://build.i3wm.org/docs/ipc.html
12 #   (or docs/ipc)
13 #
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 #   (unless you are already familiar with Perl)
16 #
17 # Verify that i3 does not crash when restart is issued while a window with a
18 # title that contains non-UTF8 characters is open.
19 # Ticket: #3156
20 # Bug still in: 4.15-241-g9dc4df81
21 use i3test;
22
23 my $ws = fresh_workspace;
24 open_window(name => "\x{AA} <-- invalid");
25
26 cmd 'restart';
27 does_i3_live;
28
29 # Confirm that the invalid character got replaced with U+FFFD - "REPLACEMENT
30 # CHARACTER"
31 cmd '[title="^' . "\x{fffd}" . ' <-- invalid$"] fullscreen enable';
32 is_num_fullscreen($ws, 1, 'title based criterion works');
33
34 done_testing;