patch/Test-suite-fix-Korn-shell-incompatibility.patch
Xibo.Wang 77894f3f9d Test suite: fix Korn shell incompatibility
tests/merge: In a Korn shell, shift apparently fails when $# is 0
2022-12-28 18:58:01 +08:00

29 lines
699 B
Diff

From 8f52e719d7b35e9f89b1e75d3aa8d3063de6d81a Mon Sep 17 00:00:00 2001
From: Andreas Gruenbacher <agruen@gnu.org>
Date: Wed, 7 Feb 2018 17:05:00 +0100
Subject: [PATCH] Test suite: fix Korn shell incompatibility
tests/merge: In a Korn shell, shift apparently fails when $# is 0.
Signed-off-by: Xibo.Wang <wangxb12@chinatelecom.cn>
---
tests/merge | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/merge b/tests/merge
index b628891..e950b92 100644
--- a/tests/merge
+++ b/tests/merge
@@ -32,7 +32,7 @@ x2() {
shift
done > b.sed
echo "$body" | sed -f b.sed > b
- shift
+ test $# -eq 0 || shift
while test $# -gt 0 ; do
echo "$1"
shift
--
1.8.3.1