summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/expression_parser_text_test.cpp
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2015-10-26 11:20:12 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2015-10-26 15:07:07 -0400
commit1c91d1a2b789fef8be6427de81c35658ff30009d (patch)
treebaf49d48e66a16b774b41b7647f32cd9bbd2e212 /src/mongo/db/matcher/expression_parser_text_test.cpp
parent75689917412c571427f12b7fe29a4dfa458d2df3 (diff)
downloadmongo-1c91d1a2b789fef8be6427de81c35658ff30009d.tar.gz
Revert "SERVER-20888: Defer $language check to FTSQuery::Parse"
This reverts commit 4c38ff13739e60d33d52b0c944d55249e7d9cc68.
Diffstat (limited to 'src/mongo/db/matcher/expression_parser_text_test.cpp')
-rw-r--r--src/mongo/db/matcher/expression_parser_text_test.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/matcher/expression_parser_text_test.cpp b/src/mongo/db/matcher/expression_parser_text_test.cpp
index 5aae8f0acd0..3d51604f7ef 100644
--- a/src/mongo/db/matcher/expression_parser_text_test.cpp
+++ b/src/mongo/db/matcher/expression_parser_text_test.cpp
@@ -54,6 +54,13 @@ TEST(MatchExpressionParserText, Basic) {
ASSERT_EQUALS(textExp->getDiacriticSensitive(), fts::FTSQuery::diacriticSensitiveDefault);
}
+TEST(MatchExpressionParserText, LanguageError) {
+ BSONObj query = fromjson("{$text: {$search:\"awesome\", $language:\"spanglish\"}}");
+
+ StatusWithMatchExpression result = MatchExpressionParser::parse(query);
+ ASSERT_FALSE(result.isOK());
+}
+
TEST(MatchExpressionParserText, CaseSensitiveTrue) {
BSONObj query = fromjson("{$text: {$search:\"awesome\", $caseSensitive: true}}");