Changeset 10311 for trunk/Ohana/src/opihi/cmd.basic/test/if.sh
- Timestamp:
- Nov 30, 2006, 9:02:30 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.basic/test/if.sh (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.basic/test/if.sh
r9197 r10311 12 12 test10 13 13 test11 14 test12 15 test13 16 test14 14 17 end 15 18 … … 168 171 169 172 173 # basic logical test 174 macro test11 175 176 local a b 177 178 $a = 1 179 $b = 2 180 181 if (($a <= 0) || ($b >= 3)) 182 $PASS = 0 183 else 184 $PASS = 1 185 end 186 end 187 188 189 # basic logical test 190 macro test12 191 192 local a 193 194 $a = 1 195 196 if ($a != 1) 197 $PASS = 0 198 else 199 $PASS = 1 200 end 201 end 202 203 170 204 # check memleaks 171 macro test1 1205 macro test13 172 206 173 207 local a b i N … … 197 231 end 198 232 end 233 234 # memory test using break 235 macro test14 236 237 local a b i N 238 239 list word -x "ps -p $PID -o rss" 240 $startmem = $word:1 241 242 output /dev/null 243 $a = 1 244 $b = 2 245 for i 0 10000 246 if (($a == 1) && ($b == 2)) 247 break 248 echo "run" 249 end 250 end 251 output stdout 252 253 list word -x "ps -p $PID -o rss" 254 $endmem = $word:1 255 256 if ({$endmem - $startmem} < 10) 257 $PASS = 1 258 else 259 $PASS = 0 260 echo "growth: {$endmem-$startmem}" 261 echo "kB/loop: {($endmem-$startmem)/10000}" 262 end 263 end
Note:
See TracChangeset
for help on using the changeset viewer.
