-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kpathsea/tests/kpse{access,readlink}.test: revert
revert because it does not fit to Windows environment.
- Loading branch information
Showing
2 changed files
with
20 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,49 +4,44 @@ | |
# Copyright 2010 Peter Breitenlohner <[email protected]> | ||
# You may freely use, modify and/or distribute this file. | ||
|
||
BinDir=${BinDir:-.} | ||
ExeExt=${ExeExt:-} | ||
_kpseaccess=$BinDir/kpseaccess$ExeExt | ||
_kpsewhich=$BinDir/kpsewhich$ExeExt | ||
|
||
ret=0 | ||
|
||
pass () { | ||
echo "***** unexpected success of '$_kpseaccess $@'" | ||
echo "***** unexpected success of './kpseaccess $@'" | ||
ret=77 | ||
} | ||
|
||
fail () { | ||
echo "***** unexpected failure of '$_kpseaccess $@'" | ||
echo "***** unexpected failure of './kpseaccess $@'" | ||
ret=77 | ||
} | ||
|
||
$_kpseaccess '' nonesuch && exit 1 | ||
$_kpseaccess - nonesuch && exit 2 | ||
$_kpseaccess r nonesuch && exit 3 | ||
$_kpseaccess w nonesuch && exit 4 | ||
$_kpseaccess x nonesuch && exit 5 | ||
./kpseaccess '' nonesuch && exit 1 | ||
./kpseaccess - nonesuch && exit 1 | ||
./kpseaccess r nonesuch && exit 1 | ||
./kpseaccess w nonesuch && exit 1 | ||
./kpseaccess x nonesuch && exit 1 | ||
|
||
$_kpseaccess '' access.o || exit 6 | ||
$_kpseaccess - access.o || exit 7 | ||
$_kpseaccess rw access.o || exit 8 | ||
./kpseaccess '' access.o || exit 1 | ||
./kpseaccess - access.o || exit 1 | ||
./kpseaccess rw access.o || exit 1 | ||
# From the access(3p) POSIX manpage: | ||
# If the process has appropriate privileges, an implementation may indicate | ||
# success for X_OK even if none of the execute file permission bits are set. | ||
$_kpseaccess x access.o && pass x access.o | ||
./kpseaccess x access.o && pass x access.o | ||
|
||
# Testing write access to kpseaccess itself might fail with ETXTBSY. | ||
$_kpseaccess rwx $_kpsewhich || { | ||
./kpseaccess rwx kpsewhich || { | ||
fail rwx kpsewhich | ||
$_kpseaccess r $_kpsewhich || fail r kpsewhich | ||
$_kpseaccess w $_kpsewhich || fail w kpsewhich | ||
$_kpseaccess x $_kpsewhich || fail x kpsewhich | ||
./kpseaccess r kpsewhich || fail r kpsewhich | ||
./kpseaccess w kpsewhich || fail w kpsewhich | ||
./kpseaccess x kpsewhich || fail x kpsewhich | ||
} | ||
|
||
$_kpseaccess r $srcdir/access.c || exit 9 | ||
$_kpseaccess x $srcdir/access.c && pass x $srcdir/access.c | ||
./kpseaccess r $srcdir/access.c || exit 1 | ||
./kpseaccess x $srcdir/access.c && pass x $srcdir/access.c | ||
|
||
if $_kpseaccess w $srcdir/access.c; then | ||
if ./kpseaccess w $srcdir/access.c; then | ||
echo 'file "$srcdir/access.c" is writable' | ||
else | ||
echo 'file "$srcdir/access.c" is not writable' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,11 @@ | |
# Copyright 2010 Peter Breitenlohner <[email protected]> | ||
# You may freely use, modify and/or distribute this file. | ||
|
||
BinDir=${BinDir:-.} | ||
ExeExt=${ExeExt:-} | ||
_kpsereadlink=$BinDir/kpsereadlink$ExeExt | ||
|
||
test "x$LN_S" = 'xln -s' || exit 77 | ||
|
||
$_kpsereadlink $LT_OBJDIR/libkpathsea.lai && exit 1 | ||
./kpsereadlink $LT_OBJDIR/libkpathsea.lai && exit 1 | ||
|
||
link=`$_kpsereadlink $LT_OBJDIR/libkpathsea.la` || exit 1 | ||
link=`./kpsereadlink $LT_OBJDIR/libkpathsea.la` || exit 1 | ||
|
||
test "x$link" = x../libkpathsea.la || exit 1 | ||
|