]> xenbits.xensource.com Git - libvirt.git/commitdiff
test-wrap-argv: return a string in rewrap_line
authorJán Tomko <jtomko@redhat.com>
Mon, 30 May 2016 17:04:32 +0000 (19:04 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 21 Jun 2016 16:13:07 +0000 (18:13 +0200)
Leave the printing up to &rewrap.

tests/test-wrap-argv.pl

index 4e942cd90fa700c5b543252015cb44f2f058bd6d..1f619cc7b08b8cb15ce1a53d851e667ca4ded3aa 100755 (executable)
@@ -59,7 +59,7 @@ sub rewrap {
     # Now each @lines represents a single command, we
     # can process them
     foreach my $line (@lines) {
-        &rewrap_line ($line);
+        print &rewrap_line ($line);
     }
 
 }
@@ -103,7 +103,7 @@ sub rewrap_line {
     # We might have to split line argument values...
     @args = map { &rewrap_arg($_) } @args;
     # Print env + command first
-    print join(" \\\n", @env, $cmd, @args), "\n";
+    return join(" \\\n", @env, $cmd, @args), "\n";
 }
 
 sub rewrap_arg {