From fd7319683d8c4a5efbfd3431c1ab22ecac8bf59d Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Wed, 13 Sep 2017 13:32:12 +0300 Subject: [PATCH] Don't insert newline at end of config with launch_with_config --- testcases/lib/i3test.pm.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; -- 2.39.5