1dnl PSPP - a program for statistical analysis. 2dnl Copyright (C) 2017 Free Software Foundation, Inc. 3dnl 4dnl This program is free software: you can redistribute it and/or modify 5dnl it under the terms of the GNU General Public License as published by 6dnl the Free Software Foundation, either version 3 of the License, or 7dnl (at your option) any later version. 8dnl 9dnl This program is distributed in the hope that it will be useful, 10dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 11dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12dnl GNU General Public License for more details. 13dnl 14dnl You should have received a copy of the GNU General Public License 15dnl along with this program. If not, see <http://www.gnu.org/licenses/>. 16dnl 17AT_BANNER([PERMISSIONS]) 18 19AT_SETUP([PERMISSIONS]) 20AT_DATA([foobar], [Hello 21]) 22 23chmod 666 foobar 24AT_CHECK([ls -l foobar], [0], [stdout]) 25AT_CHECK([sed 's/^\(..........\).*/\1/' stdout], [0], [-rw-rw-rw- 26]) 27 28AT_DATA([permissions.sps], [PERMISSIONS /FILE='foobar' PERMISSIONS=READONLY. 29]) 30AT_CHECK([pspp -O format=csv permissions.sps]) 31AT_CHECK([ls -l foobar], [0], [stdout]) 32AT_CHECK([sed 's/^\(..........\).*/\1/' stdout], [0], [-r--r--r-- 33]) 34 35AT_DATA([permissions.sps], [PERMISSIONS /FILE='foobar' PERMISSIONS=WRITEABLE. 36]) 37AT_CHECK([pspp -O format=csv permissions.sps]) 38AT_CHECK([ls -l foobar], [0], [stdout]) 39AT_CHECK([sed 's/^\(..........\).*/\1/' stdout], [0], [-rw-r--r-- 40]) 41AT_CLEANUP 42 43 44 45AT_SETUP([PERMISSIONS - bad syntax]) 46AT_DATA([pe.sps], [[PERMI|SIONS /FILE='foobar' PERMISSIONS=WRITEABLE. 47]]) 48 49AT_CHECK([pspp -O format=csv pe.sps], [1], [dnl 50pe.sps:1.6: error: PERMISSIONS: Syntax error at `|': expecting STRING. 51]) 52AT_CLEANUP 53