aboutsummaryrefslogtreecommitdiff
path: root/io/ftwtest-sh
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-01-12 22:54:47 +0000
committerUlrich Drepper <drepper@redhat.com>2003-01-12 22:54:47 +0000
commitb2608c22036ee37754d87185c29a0b986b7e70c6 (patch)
treeed9d8ac242ba7cb8915000162b3a699f5eef63a0 /io/ftwtest-sh
parenta5ce5fcf3830323f2d72c203491fa88a63a07036 (diff)
downloadglibc-b2608c22036ee37754d87185c29a0b986b7e70c6.tar
glibc-b2608c22036ee37754d87185c29a0b986b7e70c6.tar.gz
glibc-b2608c22036ee37754d87185c29a0b986b7e70c6.tar.bz2
glibc-b2608c22036ee37754d87185c29a0b986b7e70c6.zip
Update.
* io/ftwtest-sh: Add test case for relative path with /. at the end. 2003-01-12 Jim Meyering <jim@meyering.net> * io/ftw.c (ftw_startup): When trying to stat the starting directory, use the basename if we've already chdir'd into its parent directory. 2003-01-12 Ulrich Drepper <drepper@redhat.com> to change directory after call to ftw_dir.
Diffstat (limited to 'io/ftwtest-sh')
-rw-r--r--io/ftwtest-sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/io/ftwtest-sh b/io/ftwtest-sh
index 27b810073d..4f3b7865e8 100644
--- a/io/ftwtest-sh
+++ b/io/ftwtest-sh
@@ -160,6 +160,28 @@ base = "ftwtest.d/foo/lvl1/lvl2/lvl3/", file = "file@3", flag = FTW_F, cwd = $tm
EOF
rm $testout
+curwd=`/bin/pwd 2>/dev/null || /usr/bin/pwd`
+cd "$tmp"
+LD_LIBRARY_PATH=$objpfx $ldso $testprogram --chdir ftwtest.d/. |
+ sort > $testout
+cd "$curwd"
+
+cat <<EOF | diff -u $testout - || exit 1
+base = "ftwtest.d/", file = ".", flag = FTW_D, cwd = $tmpreal/ftwtest.d, level = 0
+base = "ftwtest.d/./", file = "bar", flag = FTW_D, cwd = $tmpreal/ftwtest.d, level = 1
+base = "ftwtest.d/./", file = "baz", flag = FTW_F, cwd = $tmpreal/ftwtest.d, level = 1
+base = "ftwtest.d/./", file = "foo", flag = FTW_D, cwd = $tmpreal/ftwtest.d, level = 1
+base = "ftwtest.d/./bar/", file = "xo", flag = FTW_F, cwd = $tmpreal/ftwtest.d/bar, level = 2
+base = "ftwtest.d/./foo/", file = "lvl1", flag = FTW_D, cwd = $tmpreal/ftwtest.d/foo, level = 2
+base = "ftwtest.d/./foo/lvl1/", file = "file@1", flag = FTW_F, cwd = $tmpreal/ftwtest.d/foo/lvl1, level = 3
+base = "ftwtest.d/./foo/lvl1/", file = "link@1", flag = FTW_SLN, cwd = $tmpreal/ftwtest.d/foo/lvl1, level = 3
+base = "ftwtest.d/./foo/lvl1/", file = "lvl2", flag = FTW_D, cwd = $tmpreal/ftwtest.d/foo/lvl1, level = 3
+base = "ftwtest.d/./foo/lvl1/lvl2/", file = "file@2", flag = FTW_F, cwd = $tmpreal/ftwtest.d/foo/lvl1/lvl2, level = 4
+base = "ftwtest.d/./foo/lvl1/lvl2/", file = "lvl3", flag = FTW_D, cwd = $tmpreal/ftwtest.d/foo/lvl1/lvl2, level = 4
+base = "ftwtest.d/./foo/lvl1/lvl2/lvl3/", file = "file@3", flag = FTW_F, cwd = $tmpreal/ftwtest.d/foo/lvl1/lvl2/lvl3, level = 5
+EOF
+rm $testout
+
LD_LIBRARY_PATH=$objpfx $ldso $testprogram --early-exit $tmpdir |
sort > $testout