[lucene2] 11/104: Added patch for contrib/highlighter junit error

Kai-Chung Yan seamlik-guest at moszumanska.debian.org
Wed Mar 23 16:27:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

seamlik-guest pushed a commit to branch master
in repository lucene2.

commit 5fce132f91722724417a1bb73ab6441531a7acfa
Author: Jan-Pascal van Best <janpascal at vanbest.org>
Date:   Wed Aug 1 20:30:15 2007 +0000

    Added patch for contrib/highlighter junit error
---
 debian/patches/00list                              |  1 +
 .../04_fix-junit-error-in-contrib-highlight.dpatch | 26 ++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/debian/patches/00list b/debian/patches/00list
index 55894dc..70a7824 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -1,3 +1,4 @@
 01_remove_all_jarfiles.dpatch
 02_full.dpatch
 03_fix-benchmark-jar-locations.dpatch
+04_fix-junit-error-in-contrib-highlight.dpatch
diff --git a/debian/patches/04_fix-junit-error-in-contrib-highlight.dpatch b/debian/patches/04_fix-junit-error-in-contrib-highlight.dpatch
new file mode 100755
index 0000000..706a909
--- /dev/null
+++ b/debian/patches/04_fix-junit-error-in-contrib-highlight.dpatch
@@ -0,0 +1,26 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_fix-junit-error-in-contrib-highlight.dpatch by Mark Harwood <markharw00d at yahoo.co.uk>
+##
+## DP: Fixes a junit error in contrib/highlighter, see
+## DP: http://svn.apache.org/viewvc?view=rev&revision=529417
+
+ at DPATCH@
+
+--- trunk/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java	2006/11/09 16:21:50	472959
++++ trunk/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java	2007/04/16 22:04:07	529417
+@@ -132,7 +132,14 @@
+ 	}
+ 	public void testGetRangeFragments() throws Exception
+ 	{
+-		doSearching(FIELD_NAME + ":[kannedy TO kznnedy]"); //bug?needs lower case
++		String queryString=FIELD_NAME + ":[kannedy TO kznnedy]"; 
++		
++		//Need to explicitly set the QueryParser property to use RangeQuery rather than RangeFilters
++		QueryParser parser=new QueryParser(FIELD_NAME, new StandardAnalyzer());
++		parser.setUseOldRangeQuery(true);
++		query = parser.parse(queryString);
++		doSearching(query);
++		
+ 		doStandardHighlights();
+ 		assertTrue("Failed to find correct number of highlights " + numHighlights + " found", numHighlights == 5);
+ 	}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/lucene2.git



More information about the pkg-java-commits mailing list