From 6fd16394ea1ad70f06e1fc3b2944715370f435a2 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 23 Jun 2021 18:41:53 -0400 Subject: [PATCH 1/4] tests/anchor: add tests --- tests/anchor/anchor.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/anchor/anchor.sh b/tests/anchor/anchor.sh index c22d3f3e..e6df44cf 100755 --- a/tests/anchor/anchor.sh +++ b/tests/anchor/anchor.sh @@ -7,6 +7,8 @@ initvariables $0 ( for q in \ '"^anchortermeaudebut"' \ +'"^anchortermeaudebut"o0' \ +'"^anchortermeaudebut"o1' \ '"^ anchortermeunpeuplusloin"' \ '"^anchortermeunpeuplusloin"o30' \ '"^ anchortermeunpeuplusloin"o30' \ @@ -16,9 +18,15 @@ for q in \ '"anchortermeunpeumoinsloin$"o30' \ '"anchortermeunpeumoinsloin$"' \ '"anchortermealafin$"' \ +'"anchortermealafin$"o0' \ +'"anchortermealafin$"o1' \ 'title:"^anchortitlebegin"' \ +'title:"^anchortitlebegin"o0' \ +'title:"^anchortitlebegin"o1' \ 'title:"^anchortitleend"' \ 'title:"anchortitleend$"' \ +'title:"anchortitleend$"o0' \ +'title:"anchortitleend$"o1' \ ; do echo $q recollq -q $q From 05ad8ca9dc51d40a9c320522c5549b6c04c05ba8 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 23 Jun 2021 18:44:23 -0400 Subject: [PATCH 2/4] tests/anchor: New results file --- tests/anchor/anchor.txt | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/tests/anchor/anchor.txt b/tests/anchor/anchor.txt index 4f17474f..39bb5573 100644 --- a/tests/anchor/anchor.txt +++ b/tests/anchor/anchor.txt @@ -1,34 +1,66 @@ "^anchortermeaudebut" 1 results text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +"^anchortermeaudebut"o0 +1 results +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +"^anchortermeaudebut"o1 +2 results +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor2.html] [anchortitleprefix anchortitlebegin anchortitlemiddle anchortitleend anchortitlepostfix] 1541 bytes "^ anchortermeunpeuplusloin" 0 results "^anchortermeunpeuplusloin"o30 -1 results +2 results text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor2.html] [anchortitleprefix anchortitlebegin anchortitlemiddle anchortitleend anchortitlepostfix] 1541 bytes "^ anchortermeunpeuplusloin"o30 -1 results +2 results text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor2.html] [anchortitleprefix anchortitlebegin anchortitlemiddle anchortitleend anchortitlepostfix] 1541 bytes "anchortermenullepart" -1 results +2 results text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor2.html] [anchortitleprefix anchortitlebegin anchortitlemiddle anchortitleend anchortitlepostfix] 1541 bytes "^anchortermenullepart" 0 results "anchortermenullepart $" 0 results "anchortermeunpeumoinsloin$"o30 -1 results +2 results text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor2.html] [anchortitleprefix anchortitlebegin anchortitlemiddle anchortitleend anchortitlepostfix] 1541 bytes "anchortermeunpeumoinsloin$" 0 results "anchortermealafin$" 1 results text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +"anchortermealafin$"o0 +1 results +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +"anchortermealafin$"o1 +2 results +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor2.html] [anchortitleprefix anchortitlebegin anchortitlemiddle anchortitleend anchortitlepostfix] 1541 bytes title:"^anchortitlebegin" 1 results text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +title:"^anchortitlebegin"o0 +1 results +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +title:"^anchortitlebegin"o1 +2 results +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor2.html] [anchortitleprefix anchortitlebegin anchortitlemiddle anchortitleend anchortitlepostfix] 1541 bytes title:"^anchortitleend" 0 results title:"anchortitleend$" 1 results text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +title:"anchortitleend$"o0 +1 results +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +title:"anchortitleend$"o1 +2 results +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes +text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor2.html] [anchortitleprefix anchortitlebegin anchortitlemiddle anchortitleend anchortitlepostfix] 1541 bytes From 76500611852537f85235e9a4167985fd851a973e Mon Sep 17 00:00:00 2001 From: FeRD Date: Wed, 23 Jun 2021 19:02:34 -0400 Subject: [PATCH 3/4] runtests: Create tmpdir recursively --- tests/runtests.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/runtests.sh b/tests/runtests.sh index a8eaa898..d6a3a1d0 100644 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -96,9 +96,8 @@ test X"$toptmp" = X && fatal "empty toptmp??" test X"$toptmp" = X/ && fatal "toptmp == / ??" if test -d "$toptmp" ; then rm -rf $toptmp/* -else - mkdir $toptmp || fatal cant create temp dir $toptmp fi +mkdir -p $toptmp || fatal cant create temp dir $toptmp # Unset DISPLAY because xdg-mime may be affected by the desktop # environment on the X server From 2ae07cfd6c5f03c28f811288f6b80d9d487b572d Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 24 Jun 2021 04:32:18 -0400 Subject: [PATCH 4/4] tests: Don't modify config file to be overwritten --- tests/runtests.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/runtests.sh b/tests/runtests.sh index d6a3a1d0..2f7b0c5c 100644 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -22,9 +22,6 @@ rerootResults() cd $RECOLL_CONFDIR sed -i.bak \ - -e "s!/.*/testrecoll/!$RECOLL_TESTDATA/!g" \ - recoll.conf - sed -i.bak \ -e "s!/.*/testrecoll/!$RECOLL_TESTDATA/!g" \ mimemap