+ tests for _2 ... _7
authorEric Prud'hommeaux <eric@w3.org>
Tue, 05 Oct 2010 05:34:00 -0400
changeset 25 ac50f1549d0f
parent 24 67d55bae74c4
child 26 15291b6ad76f
+ tests for _2 ... _7
syntheticPatients/Makefile
syntheticPatients/tests/q1_2.srt
syntheticPatients/tests/q1_3.srt
syntheticPatients/tests/q1_4.srt
syntheticPatients/tests/q1_5.srt
syntheticPatients/tests/q1_6.srt
syntheticPatients/tests/q1_7.srt
--- a/syntheticPatients/Makefile	Tue Oct 05 05:32:56 2010 -0400
+++ b/syntheticPatients/Makefile	Tue Oct 05 05:34:00 2010 -0400
@@ -42,7 +42,7 @@
 	# java xerces2val document.xsd $<
 	xmllint --noout --schema indivo-schemas/envelope.xsd $<
 
-INPUTLIST  :=  AD_PCHR_1 # AD_PCHR_2 AD_PCHR_3 AD_PCHR_4 AD_PCHR_5 AD_PCHR_6 AD_PCHR_7
+INPUTLIST  :=  AD_PCHR_1 AD_PCHR_2 AD_PCHR_3 AD_PCHR_4 AD_PCHR_5 AD_PCHR_6 AD_PCHR_7
 MBOXES := $(subst AD_PCHR_, mbox_, $(INPUTLIST))
 Q1S := $(subst AD_PCHR_, q1_, $(INPUTLIST))
 #$(error TMOLIST: $(TMOLIST))
@@ -51,7 +51,7 @@
 	$(SPARQL) -qd $(word 1, $^) -e 'PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?mbox { ?s foaf:mbox ?mbox }' --compare $(word 2, $^) || echo $<\(0\): error !mbox
 
 q1_%: AD_PCHR_%-tmo.trig tests/q1.rq tests/q1_%.srt
-	$(SPARQL) -qg pchr $(word 1, $^) $(word 2, $^) --compare $(word 3, $^) || echo $<\(0\): error !q1
+	$(SPARQL) -qg pchr $(word 1, $^) $(word 2, $^) --compare $(word 3, $^) || echo $<:0: error: data\\n$(word 2, $^):0: note: query\\n$(word 3, $^):0: note: expected results
 
 test: all $(MBOXES) $(Q1S)
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q1_2.srt	Tue Oct 05 05:34:00 2010 -0400
@@ -0,0 +1,3 @@
++----------+---------------+-----------------+-----------+------------+------------+---------------------+
+| ?patient | ?patient_name | ?encounter_date | ?symptoms | ?diagnosis | ?drug_name | ?prescription_start |
++----------+---------------+-----------------+-----------+------------+------------+---------------------+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q1_3.srt	Tue Oct 05 05:34:00 2010 -0400
@@ -0,0 +1,3 @@
++----------+---------------+-----------------+-----------+------------+------------+---------------------+
+| ?patient | ?patient_name | ?encounter_date | ?symptoms | ?diagnosis | ?drug_name | ?prescription_start |
++----------+---------------+-----------------+-----------+------------+------------+---------------------+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q1_4.srt	Tue Oct 05 05:34:00 2010 -0400
@@ -0,0 +1,3 @@
++----------+---------------+-----------------+-----------+------------+------------+---------------------+
+| ?patient | ?patient_name | ?encounter_date | ?symptoms | ?diagnosis | ?drug_name | ?prescription_start |
++----------+---------------+-----------------+-----------+------------+------------+---------------------+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q1_5.srt	Tue Oct 05 05:34:00 2010 -0400
@@ -0,0 +1,5 @@
++-----------+-------------------------+-----------------+-----------------------+-----------------------+-----------------------------------+---------------------+
+| ?patient  | ?patient_name           | ?encounter_date | ?symptoms             | ?diagnosis            | ?drug_name                        | ?prescription_start |
+| _:patient | "Georg Steffen Möller" |    "2009-07-23" | "nausea and vomiting" | "adverse drug effect" | "DONEPEZIL HYDROCHLORIDE TABLETS" |        "2009-07-22" |
+| _:patient | "Georg Steffen Möller" |    "2009-07-30" |                    "" |  "referral for trial" | "DONEPEZIL HYDROCHLORIDE TABLETS" |        "2009-07-22" |
++-----------+-------------------------+-----------------+-----------------------+-----------------------+-----------------------------------+---------------------+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q1_6.srt	Tue Oct 05 05:34:00 2010 -0400
@@ -0,0 +1,7 @@
++-----------+------------------+-----------------+-----------------------------+-------------------------------+-----------------------------------+---------------------+
+| ?patient  | ?patient_name    | ?encounter_date | ?symptoms                   | ?diagnosis                    | ?drug_name                        | ?prescription_start |
+| _:patient | "Marianne Huber" |    "2009-09-15" | "Depression, gait problems" |            "Major Depression" | "DONEPEZIL HYDROCHLORIDE TABLETS" |       "2009-07-20>" |
+| _:patient | "Marianne Huber" |    "2009-09-15" | "Depression, gait problems" |               "Abnormal gait" | "DONEPEZIL HYDROCHLORIDE TABLETS" |       "2009-07-20>" |
+| _:patient | "Marianne Huber" |    "2009-11-09" |                "Depression" |            "Major Depression" | "DONEPEZIL HYDROCHLORIDE TABLETS" |       "2009-07-20>" |
+| _:patient | "Marianne Huber" |    "2009-11-16" |                      "none" | "referral to endocrinologist" | "DONEPEZIL HYDROCHLORIDE TABLETS" |       "2009-07-20>" |
++-----------+------------------+-----------------+-----------------------------+-------------------------------+-----------------------------------+---------------------+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q1_7.srt	Tue Oct 05 05:34:00 2010 -0400
@@ -0,0 +1,3 @@
++----------+---------------+-----------------+-----------+------------+------------+---------------------+
+| ?patient | ?patient_name | ?encounter_date | ?symptoms | ?diagnosis | ?drug_name | ?prescription_start |
++----------+---------------+-----------------+-----------+------------+------------+---------------------+