Index: /trunk/Ohana/src/opihi/cmd.basic/test/break.sh
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/test/break.sh	(revision 6265)
+++ /trunk/Ohana/src/opihi/cmd.basic/test/break.sh	(revision 6265)
@@ -0,0 +1,19 @@
+
+list tests
+ test1
+end
+
+# test that break will halt operation
+macro test1
+ $PASS = 1
+ break -auto off
+ for i 0 10
+   if ($i == 5)
+     break
+   end
+ end
+ if ($i != 5)
+   $PASS = 0
+ end
+end
+
Index: /trunk/Ohana/src/opihi/cmd.basic/test/cd.sh
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/test/cd.sh	(revision 6265)
+++ /trunk/Ohana/src/opihi/cmd.basic/test/cd.sh	(revision 6265)
@@ -0,0 +1,23 @@
+
+list tests
+ test1
+end
+
+# test that cd will go into a new directory
+macro test1
+ $PASS = 1
+ exec mkdir test.dir
+ output /dev/null
+ cd test.dir
+ exec touch foo.test
+ cd ..
+ output stdout
+ file test.dir/foo.test exists
+ if ($exists != 1)
+   $PASS = 0
+ end
+ exec rm -f test.dir/foo.test
+ exec rmdir test.dir
+end
+
+# i have no idea how to test pwd automatically
Index: /trunk/Ohana/src/opihi/cmd.basic/test/config.sh
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/test/config.sh	(revision 6265)
+++ /trunk/Ohana/src/opihi/cmd.basic/test/config.sh	(revision 6265)
@@ -0,0 +1,14 @@
+
+list tests
+ test1
+end
+
+# test that config does not return an error
+macro test1
+ $PASS = 1
+ config
+ if ($STATUS == 0)
+   $PASS = 0
+ end
+end
+
Index: /trunk/Ohana/src/opihi/cmd.basic/test/continue.sh
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/test/continue.sh	(revision 6265)
+++ /trunk/Ohana/src/opihi/cmd.basic/test/continue.sh	(revision 6265)
@@ -0,0 +1,18 @@
+
+list tests
+ test1
+end
+
+# test that continue skips within a loop
+macro test1
+ $PASS = 1
+ for i 0 10
+   if ($i > 5)
+      continue
+   end
+   $j = $i
+ end
+ if ($j != 5)
+   $PASS = 0
+ end
+end
Index: /trunk/Ohana/src/opihi/cmd.basic/test/date.sh
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/test/date.sh	(revision 6265)
+++ /trunk/Ohana/src/opihi/cmd.basic/test/date.sh	(revision 6265)
@@ -0,0 +1,33 @@
+
+list tests
+ test1
+ test2
+end
+
+# test that date does not return an error
+macro test1
+ $PASS = 1
+ date var
+ if ($STATUS == 0)
+   $PASS = 0
+ end
+end
+
+# test that date constructs a reasonable sample date
+macro test2
+ $PASS = 1
+ date date1
+ $date2 = `date`
+ list w1 -split $date1
+ list w2 -split $date2
+ # check the first 3 entries (day, month, date)
+ if ($w1:0 != $w2:0)
+   $PASS = 0
+ end
+ if ($w1:1 != $w2:1)
+   $PASS = 0
+ end
+ if ($w1:2 != $w2:2)
+   $PASS = 0
+ end
+end
Index: /trunk/Ohana/src/opihi/cmd.basic/test/echo.sh
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/test/echo.sh	(revision 6265)
+++ /trunk/Ohana/src/opihi/cmd.basic/test/echo.sh	(revision 6265)
@@ -0,0 +1,19 @@
+
+list tests
+ test1
+end
+
+# test that config does not return an error
+macro test1
+ $PASS = 1
+ exec rm -f test.dat
+ output test.dat
+ echo foobar
+ output stdout
+ $line = `cat test.dat`
+ # exec rm -f test.dat
+ if ($line != foobar)
+   $PASS = 0
+ end
+end
+
Index: /trunk/Ohana/src/opihi/cmd.basic/test/fprintf.sh
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/test/fprintf.sh	(revision 6265)
+++ /trunk/Ohana/src/opihi/cmd.basic/test/fprintf.sh	(revision 6265)
@@ -0,0 +1,59 @@
+
+list tests
+ test1
+ test2
+ test3
+ test4
+end
+
+macro test1
+ exec rm -f test.dat
+ output test.dat
+ fprintf "test %03d" 50
+ output stdout
+ $line = `cat test.dat`
+ if ("$line" == "test 050")
+   $PASS = 1
+ else
+   $PASS = 0
+ end
+end
+
+macro test2
+ exec rm -f test.dat
+ output test.dat
+ fprintf "test %6.3f" 123.45678
+ output stdout
+ $line = `cat test.dat`
+ if ("$line" == "test 123.457")
+   $PASS = 1
+ else
+   $PASS = 0
+ end
+end
+
+macro test3
+ exec rm -f test.dat
+ output test.dat
+ fprintf "test %x" 32
+ output stdout
+ $line = `cat test.dat`
+ if ("$line" == "test 20")
+   $PASS = 1
+ else
+   $PASS = 0
+ end
+end
+
+macro test4
+ exec rm -f test.dat
+ output test.dat
+ fprintf "test %10s" foobar
+ output stdout
+ $line = `cat test.dat`
+ if ("$line" == "test     foobar")
+   $PASS = 1
+ else
+   $PASS = 0
+ end
+end
Index: /trunk/Ohana/src/opihi/cmd.basic/test/getchr.sh
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/test/getchr.sh	(revision 6265)
+++ /trunk/Ohana/src/opihi/cmd.basic/test/getchr.sh	(revision 6265)
@@ -0,0 +1,23 @@
+
+list tests
+ test1
+ test2
+end
+
+# test that config does not return an error
+macro test1
+ $PASS = 1
+ getchr "a long string.string" . var
+ if ($var != 13)
+   $PASS = 0
+ end
+end
+
+# test that config does not return an error
+macro test2
+ $PASS = 1
+ getchr "a long string.string" a var
+ if ($var != 0)
+   $PASS = 0
+ end
+end
