4 Usage: run.sh VFSTEST PREFIX
15 VFSTEST_PREFIX
=vfstest
16 VFSTEST_TMPDIR
=$
(mktemp
-d ${PREFIX}/${VFSTEST_PREFIX}_XXXXXX
)
18 # vars for the translation test:
19 # a) here for unix-to-windows test
20 UNIX_FILE
="a\\a:a*a?a<a>a|a"
21 # translated window file name
22 WIN_FILE
="aÿa÷a¤a¿a«a»a¦a"
24 # b) here for windows-to-unix test
25 WIN_DIR
="dir_aÿa÷a¤a¿a«a»a¦a"
26 # translated unix directory name
27 UNIX_DIR
="dir_a\a:a*a?a<a>a|a"
29 incdir
=`dirname $0`/..
/..
/..
/..
/testprogs
/blackbox
34 cd $VFSTEST_TMPDIR ||
exit 1
36 # create unix file in tmpdir
37 touch $UNIX_FILE ||
exit 1
39 # test "translate" unix-to-windows
42 cmd
='$VFSTEST -f $TESTBASE/vfstest.cmd $ADDARGS '
46 if [ $ret != 0 ] ; then
53 echo "$out" |
grep $WIN_FILE >/dev
/null
2>&1
63 # test the mkdir call with special windows chars
64 # and then check the created unix directory name
67 cmd
='$VFSTEST -f $TESTBASE/vfstest1.cmd $ADDARGS '
71 if [ $ret != 0 ] ; then
78 NUM
=`find $UNIX_DIR | wc -l`
79 if [ $NUM -ne 1 ] ; then
80 echo "Cannot find $UNIX_DIR"
87 testit
"vfstest" test_vfstest || failed
=`expr $failed + 1`
89 if [ $failed = 0 ] ; then
90 testit
"vfstest1" test_vfstest_dir || failed
=`expr $failed + 1`
93 # Cleanup: remove tempdir