From bd202a5ec15b82ba9562cdd81157e703349d8459 Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Wed, 30 Sep 2020 00:00:43 +0200
Subject: xargs: fix -I SUBSTR behaviour

function                                             old     new   delta
process_stdin_with_replace                           165     204     +39

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
 testsuite/xargs.tests | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'testsuite')

diff --git a/testsuite/xargs.tests b/testsuite/xargs.tests
index 159f1ff69..e7c7c4b3d 100755
--- a/testsuite/xargs.tests
+++ b/testsuite/xargs.tests
@@ -61,4 +61,12 @@ testing "xargs -n2" \
 
 SKIP=
 
+optional FEATURE_XARGS_SUPPORT_QUOTES
+testing "xargs -I skips empty lines and leading whitespace" \
+	"xargs -I% echo '[%]'" \
+	"[2]\n[4]\n[6 6 ]\n[7]\n" \
+	"" " \n2\n\n4\n\n 6 6 \n \v \t 7\n\t\n\v\n"
+
+SKIP=
+
 exit $FAILCOUNT
-- 
cgit v1.2.3