mirror of
https://github.com/A2osX/A2osX.git
synced 2024-09-10 07:54:37 +00:00
54 lines
1.1 KiB
Plaintext
54 lines
1.1 KiB
Plaintext
NEW
|
||
PREFIX
|
||
AUTO 4,1
|
||
#!/BIN/SH
|
||
#
|
||
#
|
||
#
|
||
echo "\f\n\n IF File Tests"
|
||
echo "\n\nThis script tests that the IF -F (FILE) -D"
|
||
echo "(DIRECTORY) and -E (either FILE or DIRECTORY)"
|
||
echo "options perform as expected."
|
||
echo
|
||
IF [ -N $Log ]
|
||
ECHO "Begin IF File Tests" >> ${Log}
|
||
ELSE
|
||
SET T = 0
|
||
SET F = 0
|
||
SET P = 0
|
||
FI
|
||
# First test for $0 thats full path of this file so
|
||
# this should always work
|
||
SET T = $T + 1
|
||
IF [ -F $0 ]
|
||
Echo "IF -F $0 True: Pased"
|
||
ELSE
|
||
Echo "IF -F $0 False: Pased"
|
||
FI
|
||
# Next Test for BUILDTEST with -F which should be in current dir
|
||
|
||
# Next Test for BUILDTEST with -E which should be in current dir
|
||
|
||
# Next Test for BUILDTEST with -D which should fail as its a file
|
||
|
||
# Next check for TESTDIR with -D a directory created for this test
|
||
|
||
# Next check for TESTDIR with -E a directory created for this test
|
||
|
||
# Next check for TESTDIR with -F which should fail as its a dir
|
||
|
||
echo Testing for IFFILETEST
|
||
IF [ -F IFFILETEST ]
|
||
Echo Found
|
||
ELSE
|
||
Echo Not Found
|
||
FI
|
||
echo Testing for IFFILETEST2
|
||
IF [ -F IFFILETEST2 ]
|
||
Echo Found
|
||
ELSE
|
||
Echo Not Found
|
||
FI
|
||
MAN
|
||
TEXT /MAKE/USR/SHARE/TESTS/IFFILETEST
|