summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2019-01-15 13:12:01 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2019-01-15 13:12:01 (GMT)
commit068f5dbd006c02f9e70558a2b19e61becb5ed652 (patch) (side-by-side diff)
treedca2dac1ee2caa1b7adde2a601e8bf599d2681f4
parent3be097c12ec14a69b3f3df3e2138fa235a3154d7 (diff)
downloadcpio-068f5dbd006c02f9e70558a2b19e61becb5ed652.tar.gz
cpio-068f5dbd006c02f9e70558a2b19e61becb5ed652.tar.bz2
Minor fix in the testsuite
* tests/symlink-long.at: Use m4 to create dirname, instead of using bash-specific syntax.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--.gitignore2
-rw-r--r--tests/symlink-long.at12
2 files changed, 9 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index fae03de..92e9421 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+/ABOUT-NLS
+/build-aux
/ABOUT-NLS~
*.a
*.o
diff --git a/tests/symlink-long.at b/tests/symlink-long.at
index cd41154..741b073 100644
--- a/tests/symlink-long.at
+++ b/tests/symlink-long.at
@@ -23,14 +23,14 @@
AT_SETUP([symlink-long])
AT_KEYWORDS([symlink-long copyout])
+m4_pushdef([DIRNAME],
+[m4_if($1,0,,[xxxxxxxxx/DIRNAME(m4_decr($1))])])
+
AT_CHECK([
# len(dirname) > READBUFSIZE
-dirname=
-for i in {1..52}; do
- dirname="xxxxxxxxx/$dirname"
- mkdir "$dirname"
-done
+dirname=DIRNAME(52)
+AS_MKDIR_P($dirname)
ln -s "$dirname" x || AT_SKIP_TEST
echo x | cpio -o > ar
@@ -43,4 +43,6 @@ test "$list" = "$dirname" && echo success || echo fail
2 blocks
])
+m4_popdef([DIRNAME])
+
AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.