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 STAT_CONFIG_PATH=$top_srcdir/config
14 export STAT_CONFIG_PATH
51 activity="Create file"
54 if [ $? -ne 0 ] ; then no_result ; fi
56 activity="Create program"
58 PERMISSIONS /FILE='foobar'
59 PERMISSIONS = READONLY.
61 if [ $? -ne 0 ] ; then no_result ; fi
63 activity="run program"
64 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/per.sps
65 if [ $? -ne 0 ] ; then no_result ; fi
67 activity="Check Permissions"
68 ls -l foobar | grep '^-r-xr-xr-x' > /dev/null
69 if [ $? -ne 0 ] ; then fail ; fi
72 activity="Create program"
74 PERMISSIONS /FILE='foobar'
75 PERMISSIONS = WRITEABLE.
77 if [ $? -ne 0 ] ; then no_result ; fi
79 activity="run program"
80 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/per.sps
81 if [ $? -ne 0 ] ; then no_result ; fi
83 activity="Check Permissions"
84 ls -l foobar | grep '^-rwxr-xr-x' > /dev/null
85 if [ $? -ne 0 ] ; then fail ; fi