Update MAKE and tests

This commit is contained in:
Patrick Kloepfer 2019-11-29 15:29:25 -05:00
parent 8be5e78b32
commit 9bc755d734
5 changed files with 7 additions and 4 deletions

View File

@ -63,7 +63,8 @@ As briefly discussed above, almost all commands take and most even require an ar
#### \<conditions\>
The shell features a lot of built-in checks and comparisons called \<conditions\> throughout this guide. This particular form of an argument is used exclusively by the **IF** and **WHILE** commands where the \<condition\> is evaluated and result is used to control program flow with in the defined **IF-ELSE-FI** or **WHILE-LOOP** block. All conditions must be encloded with in brackets **[]**. In addition to the capabilities found in the extensive list of checks and comparisons listed below, conditional execution can be enhanced by negating with an ! in front of a condition and/or compounding with AND and OR between two or more conditions. The following scripts show examples of the possible conditions you can use while writing your own scripts.
The shell features a lot of built-in checks and comparisons called \<conditions\> throughout this guide. This particular form of an argument is used exclusively by the **IF** and **WHILE** commands where the \<condition\> is evaluated and result is used to control program flow with in the defined **IF-ELSE-FI** or **WHILE-LOOP** block. All conditions must be encloded with in brackets **[]**. In addition to the capabilities found in the extensive list of checks and comparisons listed below, conditional execution can be enhanced by negating with an ! in front of a condition and/or compounding with AND and OR between two or more conditions. The following scripts show examples of the possible conditions
can use while writing your own scripts.
> Note: The examples below make use of the **;** directive which allows you to put multiple statements on one line. So for example

Binary file not shown.

View File

@ -12,7 +12,7 @@ echo "\n\nThis script tests that the A2osX Shell (SH)"
echo "correctly tests that scripts contain the correct"
echo "shell script header #!:/bin/sh"
echo
BADSCRIPT 2> /DEV/NULL
BADSCRIPT 2> /dev/null
SET R = $?
IF [ $R -EQ 118 ]
IF [ -N $Log ]

View File

@ -100,6 +100,8 @@ ECHO "\n Calling IFNUMTEST\n" >> ${Log}
ECHO "\n----------------------------------------\n" >> ${Log}
. IFNUMTEST
ECHO "\n----------------------------------------\n" >> ${Log}
MEM
PAUSE
ECHO "\n Calling IFANDORTEST\n" >> ${Log}
ECHO "\n----------------------------------------\n" >> ${Log}
. IFANDORTEST

View File

@ -229,8 +229,8 @@ ELSE
SET F = $F + 1
FI
FI
# Fifteenth Test Dec Var to Constant Int
SET ABC = 1234.4321
# Fifteenth Test Int Var to Constant Int
SET ABC = 1234
SET T = $T + 1
IF [ $ABC -EQ 1234 ]
Echo " Test 15 Dec Var to Int : True : PASSED"