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.15~93^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fd7319683d8c4a5efbfd3431c1ab22ecac8bf59d;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 683f3d39..5e3f8b2d 100644 --- a/testcases/lib/i3test.pm.in +++ b/testcases/lib/i3test.pm.in @@ -835,8 +835,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: $!"); @@ -844,9 +847,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;