3 # This program tests the PERMISSIONS command
5 TEMPDIR=/tmp/pspp-tst-$$
6 TESTFILE=$TEMPDIR/`basename $0`.sps
10 # ensure that top_srcdir is absolute
11 cd $top_srcdir; top_srcdir=`pwd`
13 export STAT_CONFIG_PATH=$top_srcdir/config
50 activity="Create file"
53 if [ $? -ne 0 ] ; then no_result ; fi
55 activity="Create program"
57 PERMISSIONS /FILE='foobar'
58 PERMISSIONS = READONLY.
60 if [ $? -ne 0 ] ; then no_result ; fi
62 activity="run program"
63 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/per.sps
64 if [ $? -ne 0 ] ; then no_result ; fi
66 activity="Check Permissions"
67 ls -l foobar | grep '^-r-xr-xr-x' > /dev/null
68 if [ $? -ne 0 ] ; then fail ; fi
71 activity="Create program"
73 PERMISSIONS /FILE='foobar'
74 PERMISSIONS = WRITEABLE.
76 if [ $? -ne 0 ] ; then no_result ; fi
78 activity="run program"
79 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/per.sps
80 if [ $? -ne 0 ] ; then no_result ; fi
82 activity="Check Permissions"
83 ls -l foobar | grep '^-rwxr-xr-x' > /dev/null
84 if [ $? -ne 0 ] ; then fail ; fi