Improved the unsafe_symlink() code to not get fooled by extra '/' chars
[rsync/rsync.git] / testsuite / unsafe-byname.test
index 61e0e24..69b338f 100644 (file)
@@ -19,33 +19,41 @@ test_unsafe() {
     fi
 }
 
-test_unsafe file               from                    safe
-test_unsafe dir/file           from                    safe
-test_unsafe dir/./file         from                    safe
-test_unsafe dir/.              from                    safe
-test_unsafe dir/               from                    safe
-
-test_unsafe /etc/passwd                from                    unsafe
-test_unsafe //../etc/passwd    from                    unsafe
-test_unsafe //./etc/passwd     from                    unsafe
-
-test_unsafe ./foo              from                    safe
-test_unsafe ../foo             from                    unsafe
-test_unsafe ../dest            from/dir                safe
-
-test_unsafe ..                 from/file               safe
-test_unsafe ../..              from/file               unsafe
-test_unsafe dir/..             from                    safe
-test_unsafe dir/../..          from                    unsafe
-
-test_unsafe ''                  from                   unsafe
+test_unsafe file                       from                            safe
+test_unsafe dir/file                   from                            safe
+test_unsafe dir/./file                 from                            safe
+test_unsafe dir/.                      from                            safe
+test_unsafe dir/                       from                            safe
+
+test_unsafe /etc/passwd                from                            unsafe
+test_unsafe //../etc/passwd            from                            unsafe
+test_unsafe //./etc/passwd             from                            unsafe
+
+test_unsafe ./foo                      from                            safe
+test_unsafe ../foo                     from                            unsafe
+test_unsafe ./../foo                   from                            unsafe
+test_unsafe .//../foo                  from                            unsafe
+test_unsafe ./../foo                   from/..                         unsafe
+test_unsafe ../dest                    from/dir                        safe
+test_unsafe ../../dest                 from//dir                       unsafe
+test_unsafe ..//../dest                from/dir                        unsafe
+
+test_unsafe ..                         from/file                       safe
+test_unsafe ../..                      from/file                       unsafe
+test_unsafe ..//..                     from//file                      unsafe
+test_unsafe dir/..                     from                            safe
+test_unsafe dir/../..                  from                            unsafe
+test_unsafe dir/..//..                 from                            unsafe
+
+test_unsafe ''                         from                            unsafe
 
 # Based on tests from unsafe-links by VladimĂ­r Michl
-test_unsafe ../../unsafe/unsafefile    from/safe       unsafe
-test_unsafe ../files/file1            from/safe        safe
+test_unsafe ../../unsafe/unsafefile    from/safe                       unsafe
+test_unsafe ..//../unsafe/unsafefile   from/safe                       unsafe
+test_unsafe ../files/file1             from/safe                       safe
 
-test_unsafe ../../unsafe/unsafefile    safe    unsafe
-test_unsafe ../files/file1            safe     unsafe
+test_unsafe ../../unsafe/unsafefile    safe                            unsafe
+test_unsafe ../files/file1             safe                            unsafe
 
-test_unsafe ../../unsafe/unsafefile    `pwd`/from/safe safe
-test_unsafe ../files/file1            `pwd`/from/safe  safe
+test_unsafe ../../unsafe/unsafefile    `pwd`/from/safe                 safe
+test_unsafe ../files/file1             `pwd`/from/safe                 safe