diff --git a/sql/src/test/java/org/opensearch/sql/sql/antlr/MatchBoolPrefixParserTest.java b/sql/src/test/java/org/opensearch/sql/sql/antlr/MatchBoolPrefixParserTest.java index b0427b4a28..dfbc404a61 100644 --- a/sql/src/test/java/org/opensearch/sql/sql/antlr/MatchBoolPrefixParserTest.java +++ b/sql/src/test/java/org/opensearch/sql/sql/antlr/MatchBoolPrefixParserTest.java @@ -1,7 +1,10 @@ package org.opensearch.sql.sql.antlr; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.util.stream.Stream; public class MatchBoolPrefixParserTest extends SQLParserTest { @@ -10,6 +13,23 @@ public void testDefaultParameters() { acceptQuery("SELECT * FROM T WHERE MATCH_BOOL_PREFIX(message, 'query')"); } + static Stream generateAvailableParameters() { + return Stream.of( + new String("minimum_should_match=3"), + new String("fuzziness=AUTO"), + new String("prefix_length=0"), + new String("max_expansions=50"), + new String("fuzzy_transpositions=true"), + new String("fuzzy_rewrite=constant_score") + ); + } + + @ParameterizedTest + @MethodSource("generateAvailableParameters") + public void testAvailableParameters(String arg) { + acceptQuery("SELECT * FROM T WHERE MATCH_BOOL_PREFIX(message, 'query', " + arg + ")"); + } + @Test public void testOneParameter() { rejectQuery("SELECT * FROM T WHERE MATCH_BOOL_PREFIX(message)");