A2osX/TESTS/IFFILETEST.txt
2019-03-06 21:13:28 -05:00

54 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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