Changeset 10311 for trunk/Ohana/src/opihi/cmd.basic/test/variable.sh
- Timestamp:
- Nov 30, 2006, 9:02:30 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.basic/test/variable.sh (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.basic/test/variable.sh
r9197 r10311 14 14 test12 15 15 test13 16 test14 16 17 testmem1 17 18 testmem2 … … 41 42 end 42 43 43 # 44 # do math expressions assign the correct value (test2 -> test8) 44 45 macro test2 45 46 … … 57 58 end 58 59 59 # do we loop up in small steps correctly?60 60 macro test3 61 61 … … 73 73 end 74 74 75 # do we loop down in small steps correctly?76 75 macro test4 77 76 … … 89 88 end 90 89 91 # do we loop down in small steps correctly?92 90 macro test5 93 91 … … 105 103 end 106 104 107 # do we loop down in small steps correctly?108 105 macro test6 109 106 … … 121 118 end 122 119 123 # do we loop down in small steps correctly?120 # testing operation priority 124 121 macro test7 125 122 126 local i 123 local i j 127 124 128 125 $i = 2 - 3*2 129 130 if ($i == -4) 126 $j = 10/2*5+5 127 128 if (($i == -4) && ($j == 30)) 129 $PASS = 1 130 else 131 $PASS = 0 132 echo "i: $i\ j: $j" 133 end 134 135 end 136 137 # testing math on negative numbers 138 macro test8 139 140 local i 141 142 $i = -2 - -3 143 144 if ($i == 1) 131 145 $PASS = 1 132 146 else … … 137 151 end 138 152 139 # do we loop down in small steps correctly? 140 macro test8 141 142 local i 143 144 $i = -2 - -3 145 146 if ($i == 1) 147 $PASS = 1 148 else 149 $PASS = 0 150 echo "i: $i" 151 end 152 153 end 154 155 # do we loop down in small steps correctly? 153 # testing the existance of variables 156 154 macro test9 157 155 … … 237 235 end 238 236 237 # test local variables 238 macro test14 239 240 $PASS = 1 241 242 if (($?i == 1) || ($?N == 1)) 243 $PASS = 0 244 end 245 end 246 239 247 # check memleaks (set global) 240 248 macro testmem1 … … 495 503 end 496 504 end 497
Note:
See TracChangeset
for help on using the changeset viewer.
