Index: /branches/eam_branch_20081124/Ohana/src/addstar/test/addstar.sh
===================================================================
--- /branches/eam_branch_20081124/Ohana/src/addstar/test/addstar.sh	(revision 20924)
+++ /branches/eam_branch_20081124/Ohana/src/addstar/test/addstar.sh	(revision 20925)
@@ -1,3 +1,42 @@
 
+macro test.measure.basic
+  
+  $PASS = 1
+
+  catdir catdir.test
+  skyregion 9 11 19 21
+
+  mextract ra, dec, xccd, yccd, mag:inst, mag, mag:err, time, photcode
+
+  if (ra[] != 242) 
+    $PASS = 0
+    echo "found the wrong number of measurements in db"
+  end
+
+  avextract ra, dec
+
+  if (ra[] != 242) 
+    $PASS = 0
+    echo "found the wrong number of stars in db"
+  end
+
+  ### XXX write down some tests of things we know about the input data values
+  ### XXX probably need to add options to mkcmf to eliminate poisson error
+end
+
+# create a populated catdir with a couple of cmf files
+macro mkcatdir
+
+  exec rm -rf catdir.test
+
+  mkinput
+  exec mkcmf test.in.txt test.1.cmf -date 2008/1/1 -time 01:00:00 -radec 10.0 20.0
+  exec mkcmf test.in.txt test.2.cmf -date 2008/1/1 -time 02:00:00 -radec 10.0 20.0
+
+  exec addstar -D CATDIR catdir.test -D CAMERA simtest test.1.cmf
+  exec addstar -D CATDIR catdir.test -D CAMERA simtest test.2.cmf
+end
+
+# make a simple input file for mkcmf
 macro mkinput
   exec rm -f test.in.txt
@@ -17,2 +56,3 @@
    lim x y; clear; box; zplot -pt 7 x y m -10 -15
 end
+
