4 Usage: run.sh VFSTEST PREFIX
15 VFSTEST_PREFIX
=vfstest
16 VFSTEST_TMPDIR
=$
(mktemp
-d ${PREFIX}/${VFSTEST_PREFIX}_XXXXXX
)
18 # We could pass in the --option=... via tests.py as ADDARGS
19 # Atm i've choosen to specify them here:
21 MYARGS1
="--option=vfsobjects=catia"
22 MYARGS2
="--option=catia:mappings=0x22:0xa8,0x2a:0xa4,0x2f:0xf8,0x3a:0xf7,0x3c:0xab,0x3e:0xbb,0x3f:0xbf,0x5c:0xff,0x7c:0xa6,0x20:0xb1"
24 # vars for the translation test:
25 # a) here for unix-to-windows test
26 UNIX_FILE
="a\\a:a*a?a<a>a|a"
27 # translated window file name
28 WIN_FILE
="aÿa÷a¤a¿a«a»a¦a"
30 # b) here for windows-to-unix test
31 WIN_DIR
="dir_aÿa÷a¤a¿a«a»a¦a"
32 # translated unix directory name
33 UNIX_DIR
="dir_a\a:a*a?a<a>a|a"
35 incdir
=`dirname $0`/..
/..
/..
/..
/testprogs
/blackbox
40 cd $VFSTEST_TMPDIR ||
exit 1
42 # create unix file in tmpdir
43 touch $UNIX_FILE ||
exit 1
45 # test "translate" unix-to-windows
48 cmd
='$VFSTEST -f $TESTBASE/vfstest.cmd $MYARGS1 $MYARGS2 $ADDARGS '
52 if [ $ret != 0 ] ; then
59 echo "$out" |
grep $WIN_FILE >/dev
/null
2>&1
69 # test the mkdir call with special windows chars
70 # and then check the created unix directory name
73 cmd
='$VFSTEST -f $TESTBASE/vfstest1.cmd $MYARGS1 $MYARGS2 $ADDARGS '
77 if [ $ret != 0 ] ; then
84 NUM
=`find $UNIX_DIR | wc -l`
85 if [ $NUM -ne 1 ] ; then
86 echo "Cannot find $UNIX_DIR"
93 testit
"vfstest_catia" test_vfstest || failed
=`expr $failed + 1`
95 if [ $failed = 0 ] ; then
96 testit
"vfstest1_catia" test_vfstest_dir || failed
=`expr $failed + 1`
99 # Cleanup: remove tempdir
100 rm -R $VFSTEST_TMPDIR