]> git.sur5r.net Git - i3/i3/commitdiff
Don't insert newline at end of config with launch_with_config
authorOrestis Floros <orestisf1993@gmail.com>
Wed, 13 Sep 2017 10:32:12 +0000 (13:32 +0300)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 13 Sep 2017 16:46:02 +0000 (18:46 +0200)
testcases/lib/i3test.pm.in

index f9b3e9398e4165e35edb1d4ee7cc2dd8776ecfae..ca64edfd8c6062b46272dd3db0b21e6fe21118e3 100644 (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;