drsuapi.idl: add drsuapi_DrsMoreOptions with DRSUAPI_DRS_GET_TGT
[Samba.git] / source3 / script / tests / vfstest-catia / run.sh
blobc345f11682a38e2487f4ffed16f29127846611a9
1 #!/bin/sh
2 if [ $# -lt 2 ]; then
3 cat <<EOF
4 Usage: run.sh VFSTEST PREFIX
5 EOF
6 exit 1;
7 fi
9 TESTBASE=`dirname $0`
10 VFSTEST=$1
11 PREFIX=$2
12 shift 2
13 ADDARGS="$*"
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
36 . $incdir/subunit.sh
38 failed=0
40 cd $VFSTEST_TMPDIR || exit 1
42 # create unix file in tmpdir
43 touch $UNIX_FILE || exit 1
45 # test "translate" unix-to-windows
46 test_vfstest()
48 cmd='$VFSTEST -f $TESTBASE/vfstest.cmd $MYARGS1 $MYARGS2 $ADDARGS '
49 out=`eval $cmd`
50 ret=$?
52 if [ $ret != 0 ] ; then
53 echo "$out"
54 echo "command failed"
55 false
56 return
59 echo "$out" | grep $WIN_FILE >/dev/null 2>&1
61 if [ $? = 0 ] ; then
62 echo "ALL IS WORKING"
63 true
64 else
65 false
69 # test the mkdir call with special windows chars
70 # and then check the created unix directory name
71 test_vfstest_dir()
73 cmd='$VFSTEST -f $TESTBASE/vfstest1.cmd $MYARGS1 $MYARGS2 $ADDARGS '
74 out=`eval $cmd`
75 ret=$?
77 if [ $ret != 0 ] ; then
78 echo "$out"
79 echo "command failed"
80 false
81 return
84 NUM=`find $UNIX_DIR | wc -l`
85 if [ $NUM -ne 1 ] ; then
86 echo "Cannot find $UNIX_DIR"
87 false
88 else
89 true
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
102 exit $failed