From 8b782a68a07e8edd2944e79ed5adf3a4b04b2736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Kov=C3=A1cs?= Date: Sat, 30 Nov 2024 19:17:33 +0100 Subject: [PATCH] Fix q42, improve test script --- docs/common/quotations.sql | 4 +++- statements/tests/q42_18021.brst | 7 ++++--- statements/tests/runme | 12 +++++++++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/docs/common/quotations.sql b/docs/common/quotations.sql index badff095..0aaf13a1 100644 --- a/docs/common/quotations.sql +++ b/docs/common/quotations.sql @@ -2814,11 +2814,13 @@ insert into quotations (nt_quotation_id, ot_id, nt_id, ot_book, psalm, ot_passag insert into quotations (nt_quotation_id, ot_id, nt_id, ot_book, psalm, ot_passage, nt_book, nt_passage, ot_startpos, ot_length, nt_startpos, nt_length, found_method) values (18021, 1802, 1, 'Daniel', null, 'LXX Daniel 12:1+98 12:1-111', 'Matthew', 'SBLGNT Matthew 24:21+24 24:21-34', 44466, 20, 71031, 14, 'manual'); insert into quotations_properties (quotation_ot_id, quotation_nt_id, source_given, as_it_is_written) values - (1802, 1, 'Δανιηλ του προφητου', 'γαρ'); -- γαρ = for (Daniel is mentioned formerly in Matthew 24:15) + (1802, 1, 'Δανιηλ του προφητου', 'γαρ'); -- γαρ = for (Daniel is mentioned formerly in Matthew 24:15, see below, this cannot be handled with the .brst export) insert into quotations_classifications (quotation_ot_id, quotation_nt_id, classification, classification_subtype, classified_by) values (1802, 1, 'quotation', 'literal, fuzzy, subset', 'Z.K.'); insert into nt_quotation_introductions (nt_quotation_id, nt_book, nt_passage, nt_startpos, nt_endpos) values (18021, 'Matthew', 'SBLGNT Matthew 24:21+5 24:21-60', 71012, 71018); +insert into nt_quotation_introductions (nt_quotation_id, nt_book, nt_passage, nt_startpos, nt_endpos) values + (18021, 'Matthew', 'SBLGNT Matthew 24:15+34 24:15-33', 70700, 70726); insert into clasps (nt_quotation_id, ot_id, nt_id, ot_book, ot_passage, nt_book, nt_passage, ot_startpos, ot_length, nt_startpos, nt_length) values (18021, 1802, 1, 'Daniel', 'LXX Daniel 12:1+80 12:1-144', 'Matthew', 'SBLGNT Matthew 24:21 24:21-67', 44448, 5, 71007, 5); -- εσται insert into clasps (nt_quotation_id, ot_id, nt_id, ot_book, ot_passage, nt_book, nt_passage, ot_startpos, ot_length, nt_startpos, nt_length) values diff --git a/statements/tests/q42_18021.brst b/statements/tests/q42_18021.brst index 2117f978..0f613f49 100644 --- a/statements/tests/q42_18021.brst +++ b/statements/tests/q42_18021.brst @@ -1,9 +1,10 @@ Statement q42_18021 connects SBLGNT Matthew 24:21+24 24:21 (71031-71078) with LXX Daniel 12:1+98 12:1-111 (44466-44485) based on - introduction 24:21+5 24:21-60 (71012-71018) a-y form gartote that - declares a quotation with 'γαρ' also - identifies the source with 'Δανιηλ του προφητου' moreover + introduction 24:15+34 24:15-33 (70700-70726) a-y form torhuendiadanihltoyprofhtoy that + identifies the source with 'Δανιηλ του προφητου' and + introduction 24:21+5 24:21-60 (71012-71018) a-y form gartote + declares a quotation with 'γαρ' moreover fragment 24:21 24:21-67 (71007-71011, length 5) a-y form estai matches LXX Daniel 12:1+80 12:1-144 (44448-44452, length 5) a-y form estai verbatim and diff --git a/statements/tests/runme b/statements/tests/runme index 00a0ca84..fdcdd915 100755 --- a/statements/tests/runme +++ b/statements/tests/runme @@ -2,10 +2,20 @@ # This test assumes that ../pbrst-cli has already been compiled (via "make"). +c=0 +g=0 for i in *.brst; do + c=$((c+1)) id=`basename $i .brst` l=$id.log pushd .. >/dev/null - ./pbrst-cli tests/$i 2>&1 > tests/$l || echo "error in $id" + SE=1 + ./pbrst-cli tests/$i 2>&1 > tests/$l && SE=0 + if [ $SE = 0 ]; then + grep error tests/$l && echo "(proof error in $id)" || g=$((g+1)) + else + echo "syntax error in $id" + fi popd >/dev/null done +echo "Total: $c cases, $g correct, $((c-g)) erroneous"