Don't insert newline at end of config with launch_with_config

This commit is contained in:
Orestis Floros 2017-09-13 13:32:12 +03:00 committed by Michael Stapelberg
parent 2159306b94
commit 919ac9c7ef
1 changed files with 4 additions and 4 deletions

View File

@ -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;