Index: /trunk/Ohana/src/opihi/cmd.basic/test/if.sh
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/test/if.sh	(revision 16893)
+++ /trunk/Ohana/src/opihi/cmd.basic/test/if.sh	(revision 16894)
@@ -13,6 +13,7 @@
  test11
  test12
+ test13a
  test13
-# test14
+ test14
 end
 
@@ -201,4 +202,33 @@
 end
 
+
+# check memleaks
+macro test13a
+
+ local a b i N
+
+ list word -x "ps -p $PID -o rss"
+ $startmem = $word:1
+
+ output /dev/null
+ $a = 1
+ for i 0 1000
+   if ($a == 1)
+    echo "run"    
+   end
+ end    
+ output stdout
+  
+ list word -x "ps -p $PID -o rss"
+ $endmem = $word:1
+
+ if ({$endmem - $startmem} < 10)
+   $PASS = 1
+ else
+   $PASS = 0
+   echo "growth: {$endmem-$startmem}"
+   echo "kB/loop: {($endmem-$startmem)/1000}"
+ end
+end
 
 # check memleaks
@@ -213,5 +243,5 @@
  $a = 1
  $b = 2
- for i 0 10000
+ for i 0 1000
    if (($a == 1) && ($b == 2))
     echo "run"    
@@ -228,9 +258,9 @@
    $PASS = 0
    echo "growth: {$endmem-$startmem}"
-   echo "kB/loop: {($endmem-$startmem)/10000}"
- end
-end
-
-# memory test using break
+   echo "kB/loop: {($endmem-$startmem)/1000}"
+ end
+end
+
+# memory test using continue
 macro test14
 
@@ -243,7 +273,7 @@
  $a = 1
  $b = 2
- for i 0 10000
+ for i 0 1000
    if (($a == 1) && ($b == 2))
-    break
+    continue
     echo "run"    
    end
@@ -259,5 +289,33 @@
    $PASS = 0
    echo "growth: {$endmem-$startmem}"
-   echo "kB/loop: {($endmem-$startmem)/10000}"
- end
-end
+   echo "kB/loop: {($endmem-$startmem)/1000}"
+ end
+end
+
+# memory test using continue
+macro test15
+
+ local a b i N bool
+
+ list word -x "ps -p $PID -o rss"
+ $startmem = $word:1
+
+ output /dev/null
+ $a = 1
+ $b = 2
+ for i 0 1000
+   $bool = (($a == 1) && ($b == 2))
+ end    
+ output stdout
+  
+ list word -x "ps -p $PID -o rss"
+ $endmem = $word:1
+
+ if ({$endmem - $startmem} < 10)
+   $PASS = 1
+ else
+   $PASS = 0
+   echo "growth: {$endmem-$startmem}"
+   echo "kB/loop: {($endmem-$startmem)/1000}"
+ end
+end
Index: /trunk/Ohana/src/opihi/cmd.basic/test/list.sh
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/test/list.sh	(revision 16893)
+++ /trunk/Ohana/src/opihi/cmd.basic/test/list.sh	(revision 16894)
@@ -117,5 +117,5 @@
  $startmem = $word:1
 
- for i 0 1000
+ for i 0 100
   list check3 -x "ls /dev/null"
  end    
@@ -129,5 +129,5 @@
    $PASS = 0
    echo "growth: {$endmem-$startmem}"
-   echo "kB/loop: {($endmem-$startmem)/1000}"
+   echo "kB/loop: {($endmem-$startmem)/100}"
  end
 
@@ -153,5 +153,5 @@
  $startmem = $word:1
 
- for i 0 1000
+ for i 0 100
   list check4 -x "cat list_test.txt"
  end    
@@ -165,5 +165,5 @@
    $PASS = 0
    echo "growth: {$endmem-$startmem}"
-   echo "kB/loop: {($endmem-$startmem)/1000}"
+   echo "kB/loop: {($endmem-$startmem)/100}"
  end
 
Index: /trunk/Ohana/src/opihi/cmd.basic/test/output.sh
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/test/output.sh	(revision 16893)
+++ /trunk/Ohana/src/opihi/cmd.basic/test/output.sh	(revision 16894)
@@ -45,5 +45,5 @@
 
  output /dev/null
- for i 0 1000
+ for i 0 100
   output testout.txt
   echo "This is a test."
@@ -59,5 +59,5 @@
    $PASS = 0
    echo "growth: {$endmem-$startmem}"
-   echo "kB/loop: {($endmem-$startmem)/1000}"
+   echo "kB/loop: {($endmem-$startmem)/100}"
  end
 end
Index: /trunk/Ohana/src/opihi/cmd.basic/test/variable.sh
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/test/variable.sh	(revision 16893)
+++ /trunk/Ohana/src/opihi/cmd.basic/test/variable.sh	(revision 16894)
@@ -240,5 +240,7 @@
  $PASS = 1
 
- if (($?i == 1) || ($?N == 1))
+ # a slightly weak test: depends on no prior macros defining variables
+ # with the names below
+ if (($?very_obscure_name == 1) || ($?another_obscure_name == 1))
   $PASS = 0
  end
