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
52 activity="Create file"
55 if [ $? -ne 0 ] ; then no_result ; fi
57 activity="Create program"
59 PERMISSIONS /FILE='foobar'
60 PERMISSIONS = READONLY.
62 if [ $? -ne 0 ] ; then no_result ; fi
64 activity="run program"
65 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/per.sps
66 if [ $? -ne 0 ] ; then no_result ; fi
68 activity="Check Permissions"
69 ls -l foobar | grep '^-r-xr-xr-x' > /dev/null
70 if [ $? -ne 0 ] ; then fail ; fi
73 activity="Create program"
75 PERMISSIONS /FILE='foobar'
76 PERMISSIONS = WRITEABLE.
78 if [ $? -ne 0 ] ; then no_result ; fi
80 activity="run program"
81 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/per.sps
82 if [ $? -ne 0 ] ; then no_result ; fi
84 activity="Check Permissions"
85 ls -l foobar | grep '^-rwxr-xr-x' > /dev/null
86 if [ $? -ne 0 ] ; then fail ; fi