From: Michael Stapelberg Date: Sun, 18 Dec 2011 18:02:08 +0000 (+0000) Subject: Merge branch 'master' into next X-Git-Tag: 4.2~175 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1f2c9306a27cced83ad960e929bb9e9a163b7843;p=i3%2Fi3 Merge branch 'master' into next Conflicts: testcases/t/159-socketpaths.t --- 1f2c9306a27cced83ad960e929bb9e9a163b7843 diff --cc testcases/t/159-socketpaths.t index 30460fa9,b9cc9b63..cc54d5a9 --- a/testcases/t/159-socketpaths.t +++ b/testcases/t/159-socketpaths.t @@@ -19,9 -20,20 +19,20 @@@ EO # ensure XDG_RUNTIME_DIR is not set delete $ENV{XDG_RUNTIME_DIR}; + + # See which files exist in /tmp before to not mistakenly check an already + # existing tmpdir of another i3 instance. + my @files_before = ; -my $pid = launch_with_config($config, 1); +my $pid = launch_with_config($config, dont_add_socket_path => 1); + my @files_after = ; + @files_after = grep { !($_ ~~ @files_before) } @files_after; + + is(@files_after, 1, 'one new temp directory'); my $folder = "/tmp/i3-" . getpwuid(getuid()); + like($files_after[0], qr/^$folder/, 'temp directory matches expected pattern'); + $folder = $files_after[0]; + ok(-d $folder, "folder $folder exists"); my $socketpath = "$folder/ipc-socket." . $pid; ok(-S $socketpath, "file $socketpath exists and is a socket");