Commit d25c0e42 authored by Martin Pool's avatar Martin Pool

A test suite that calls unsafe_symlink() directly to see how it

handles different strings.
parent 0ecfbf27
#! /bin/sh
# Copyright (C) 2002 by Martin Pool
# Call directly into unsafe_symlink and test its handling of various filenames
. $srcdir/testsuite/rsync.fns
test_unsafe() {
result=`"$TOOLDIR/t_unsafe" "$1" "$2"` || test_fail "Failed to check $1 $2"
if [ "$result" != "$3" ]
then
test_fail "t_unsafe $1 $2 returned \"$result\", expected \"$3\""
fi
}
set -x
test_unsafe foo foo safe
test_unsafe ../foo foo unsafe
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment