From 919ac9c7ef4be41bd3c2ef923cd38ba523d1f8c3 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 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; -- 2.39.5