3 # This program tests the PERMISSIONS command
5 TEMPDIR=/tmp/pspp-tst-$$
9 # ensure that top_srcdir is absolute
10 cd $top_srcdir; top_srcdir=`pwd`
12 export STAT_CONFIG_PATH=$top_srcdir/config
49 activity="Create file"
52 if [ $? -ne 0 ] ; then no_result ; fi
54 activity="Create program"
56 PERMISSIONS /FILE='foobar'
57 PERMISSIONS = READONLY.
59 if [ $? -ne 0 ] ; then no_result ; fi
61 activity="run program"
62 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/per.sps
63 if [ $? -ne 0 ] ; then no_result ; fi
65 activity="Check Permissions"
66 ls -l foobar | grep '^-r-xr-xr-x' > /dev/null
67 if [ $? -ne 0 ] ; then fail ; fi
70 activity="Create program"
72 PERMISSIONS /FILE='foobar'
73 PERMISSIONS = WRITEABLE.
75 if [ $? -ne 0 ] ; then no_result ; fi
77 activity="run program"
78 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/per.sps
79 if [ $? -ne 0 ] ; then no_result ; fi
81 activity="Check Permissions"
82 ls -l foobar | grep '^-rwxr-xr-x' > /dev/null
83 if [ $? -ne 0 ] ; then fail ; fi