3 # Copyright (C) 2010 Peter Breitenlohner <tex-live@tug.org>
4 # You may freely use, modify and/or distribute this file.
9 echo "***** unexpected success of './kpseaccess $@'"
14 echo "***** unexpected failure of './kpseaccess $@'"
18 .
/kpseaccess
'' nonesuch
&& exit 1
19 .
/kpseaccess
- nonesuch
&& exit 1
20 .
/kpseaccess r nonesuch
&& exit 1
21 .
/kpseaccess w nonesuch
&& exit 1
22 .
/kpseaccess x nonesuch
&& exit 1
24 .
/kpseaccess
'' access.o ||
exit 1
25 .
/kpseaccess
- access.o ||
exit 1
26 .
/kpseaccess rw access.o ||
exit 1
27 # From the access(3p) POSIX manpage:
28 # If the process has appropriate privileges, an implementation may indicate
29 # success for X_OK even if none of the execute file permission bits are set.
30 .
/kpseaccess x access.o
&& pass x access.o
32 # Testing write access to kpseaccess itself might fail with ETXTBSY.
33 .
/kpseaccess rwx kpsewhich ||
{
35 .
/kpseaccess r kpsewhich || fail r kpsewhich
36 .
/kpseaccess w kpsewhich || fail w kpsewhich
37 .
/kpseaccess x kpsewhich || fail x kpsewhich
40 .
/kpseaccess r
$srcdir/access.c ||
exit 1
41 .
/kpseaccess x
$srcdir/access.c
&& pass x
$srcdir/access.c
43 if .
/kpseaccess w
$srcdir/access.c
; then
44 echo 'file "$srcdir/access.c" is writable'
46 echo 'file "$srcdir/access.c" is not writable'