From: Orestis Floros Date: Wed, 13 Sep 2017 10:32:12 +0000 (+0300) Subject: Don't insert newline at end of config with launch_with_config X-Git-Tag: 4.14.1~38 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=919ac9c7ef4be41bd3c2ef923cd38ba523d1f8c3;p=i3%2Fi3 Don't insert newline at end of config with launch_with_config --- diff --git a/testcases/lib/i3test.pm.in b/testcases/lib/i3test.pm.in index f9b3e939..ca64edfd 100644 --- a/testcases/lib/i3test.pm.in +++ b/testcases/lib/i3test.pm.in @@ -834,8 +834,11 @@ sub launch_with_config { my ($fh, $tmpfile) = tempfile("i3-cfg-for-$ENV{TESTNAME}-XXXXX", UNLINK => 1); + say $fh "ipc-socket $tmp_socket_path" + unless $args{dont_add_socket_path}; + if ($config ne '-default') { - say $fh $config; + print $fh $config; } else { open(my $conf_fh, '<', '@abs_top_srcdir@/testcases/i3-test.config') or $tester->BAIL_OUT("could not open default config: $!"); @@ -843,9 +846,6 @@ sub launch_with_config { say $fh scalar <$conf_fh>; } - say $fh "ipc-socket $tmp_socket_path" - unless $args{dont_add_socket_path}; - close($fh); my $cv = AnyEvent->condvar;