mirror of https://github.com/A2osX/A2osX.git
Update MAKE and tests
This commit is contained in:
parent
8be5e78b32
commit
9bc755d734
|
@ -63,7 +63,8 @@ As briefly discussed above, almost all commands take and most even require an ar
|
||||||
|
|
||||||
#### \<conditions\>
|
#### \<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
|
> 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.
|
@ -12,7 +12,7 @@ echo "\n\nThis script tests that the A2osX Shell (SH)"
|
||||||
echo "correctly tests that scripts contain the correct"
|
echo "correctly tests that scripts contain the correct"
|
||||||
echo "shell script header #!:/bin/sh"
|
echo "shell script header #!:/bin/sh"
|
||||||
echo
|
echo
|
||||||
BADSCRIPT 2> /DEV/NULL
|
BADSCRIPT 2> /dev/null
|
||||||
SET R = $?
|
SET R = $?
|
||||||
IF [ $R -EQ 118 ]
|
IF [ $R -EQ 118 ]
|
||||||
IF [ -N $Log ]
|
IF [ -N $Log ]
|
||||||
|
|
|
@ -100,6 +100,8 @@ ECHO "\n Calling IFNUMTEST\n" >> ${Log}
|
||||||
ECHO "\n----------------------------------------\n" >> ${Log}
|
ECHO "\n----------------------------------------\n" >> ${Log}
|
||||||
. IFNUMTEST
|
. IFNUMTEST
|
||||||
ECHO "\n----------------------------------------\n" >> ${Log}
|
ECHO "\n----------------------------------------\n" >> ${Log}
|
||||||
|
MEM
|
||||||
|
PAUSE
|
||||||
ECHO "\n Calling IFANDORTEST\n" >> ${Log}
|
ECHO "\n Calling IFANDORTEST\n" >> ${Log}
|
||||||
ECHO "\n----------------------------------------\n" >> ${Log}
|
ECHO "\n----------------------------------------\n" >> ${Log}
|
||||||
. IFANDORTEST
|
. IFANDORTEST
|
||||||
|
|
|
@ -229,8 +229,8 @@ ELSE
|
||||||
SET F = $F + 1
|
SET F = $F + 1
|
||||||
FI
|
FI
|
||||||
FI
|
FI
|
||||||
# Fifteenth Test Dec Var to Constant Int
|
# Fifteenth Test Int Var to Constant Int
|
||||||
SET ABC = 1234.4321
|
SET ABC = 1234
|
||||||
SET T = $T + 1
|
SET T = $T + 1
|
||||||
IF [ $ABC -EQ 1234 ]
|
IF [ $ABC -EQ 1234 ]
|
||||||
Echo " Test 15 Dec Var to Int : True : PASSED"
|
Echo " Test 15 Dec Var to Int : True : PASSED"
|
||||||
|
|
Loading…
Reference in New Issue