This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 3254d810dffc5b0ea28d4c008caf841a4f8a8a77
Author: Shad Storhaug <[email protected]>
AuthorDate: Sun Feb 21 22:29:52 2021 +0700

    Lucene.Net.Analysis.Common: Added hunspell regression tests for #418
---
 .../Analysis/Hunspell/TestConditionGH418.cs        | 40 ++++++++++++++++++++++
 .../Analysis/Hunspell/condition-issue-418.aff      |  8 +++++
 .../Analysis/Hunspell/condition-issue-418.dic      |  2 ++
 3 files changed, 50 insertions(+)

diff --git 
a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestConditionGH418.cs 
b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestConditionGH418.cs
new file mode 100644
index 0000000..5865d8e
--- /dev/null
+++ 
b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestConditionGH418.cs
@@ -0,0 +1,40 @@
+using Lucene.Net.Attributes;
+using NUnit.Framework;
+
+namespace Lucene.Net.Analysis.Hunspell
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    [LuceneNetSpecific]
+    public class TestConditionGH418 : StemmerTestBase
+    {
+        [OneTimeSetUp]
+        public override void BeforeClass()
+        {
+            base.BeforeClass();
+            Init("condition-issue-418.aff", "condition-issue-418.dic");
+        }
+
+        [Test]
+        public virtual void TestStemming()
+        {
+            AssertStemsTo("rework", "work");
+            AssertStemsTo("worked", "work");
+        }
+    }
+}
diff --git 
a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/condition-issue-418.aff
 
b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/condition-issue-418.aff
new file mode 100644
index 0000000..36c2ef0
--- /dev/null
+++ 
b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/condition-issue-418.aff
@@ -0,0 +1,8 @@
+SET UTF-8
+TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ’
+
+PFX A Y 1
+PFX A 0 re [w]o
+
+SFX B Y 1
+SFX B 0 ed [r]k
\ No newline at end of file
diff --git 
a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/condition-issue-418.dic
 
b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/condition-issue-418.dic
new file mode 100644
index 0000000..1e5e6e8
--- /dev/null
+++ 
b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/condition-issue-418.dic
@@ -0,0 +1,2 @@
+1
+work/AB
\ No newline at end of file

Reply via email to