#!perl # vim:ts=4:sw=4:expandtab # # Please read the following documents before working on tests: # • http://build.i3wm.org/docs/testsuite.html # (or docs/testsuite) # # • http://build.i3wm.org/docs/lib-i3test.html # (alternatively: perldoc ./testcases/lib/i3test.pm) # # • http://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) # # Makes sure i3 deletes its temporary directory when exiting. # Ticket: #1253 # Bug still in: 4.7.2-186-g617afc6 use i3test i3_autostart => 0; use File::Basename; my $config = < 1, dont_create_temp_dir => 1); my $socketpath = get_socket_path(0); my $tmpdir = dirname($socketpath); ok(-d $tmpdir, "tmpdir $tmpdir exists"); # Clear the error logfile. The testsuite runs in an environment where RandR is # not supported, so there always is a message about xinerama in the error # logfile. my @errorlogfiles = <$tmpdir/errorlog.*>; for my $fn (@errorlogfiles) { open(my $fh, '>', $fn); close($fh); } exit_gracefully($pid); ok(! -d $tmpdir, "tmpdir $tmpdir was cleaned up"); if (-d $tmpdir) { diag('contents = ' . Dumper(<$tmpdir/*>)); } done_testing;