Add tests.
[tatoo.git] / tests / xpath / test_correction.sh
diff --git a/tests/xpath/test_correction.sh b/tests/xpath/test_correction.sh
new file mode 100644 (file)
index 0000000..7801b63
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+
+PROG="$1"
+BASEDIR="$2"
+SUMMARY=""
+
+output ()
+{
+    echo "$1"
+    if [ -f "$SUMMARY" ]
+    then
+        echo "$1" >> "$SUMMARY"
+    fi
+}
+
+for xml in "$BASEDIR"/*.xml
+do
+    QUERIES="$xml".queries
+    RESULTS="$xml".results
+    if [ -f "$QUERIES" -a -d "$RESULTS" ]
+    then
+        SUMMARY="$xml".summary
+        rm -f "$SUMMARY"
+        touch "$SUMMARY"
+        output "-- Testing file ${xml} -----------------"
+
+        cat "$QUERIES" | grep -v '^#' | while read QNAME QUERY
+        do
+
+        done
+
+
+    fi
+
+
+done