[Groonga-commit] groonga/groonga at c014a90 [master] test: add a syntax error pattern

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Aug 15 17:24:37 JST 2014


Kouhei Sutou	2014-08-15 17:24:37 +0900 (Fri, 15 Aug 2014)

  New Revision: c014a907fe16c64c668d9f87e4a927b94e6b94e9
  https://github.com/groonga/groonga/commit/c014a907fe16c64c668d9f87e4a927b94e6b94e9

  Message:
    test: add a syntax error pattern

  Added files:
    test/command/suite/select/query/invalid/missing_close_parenthesis.expected
    test/command/suite/select/query/invalid/missing_close_parenthesis.test

  Added: test/command/suite/select/query/invalid/missing_close_parenthesis.expected (+25 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/query/invalid/missing_close_parenthesis.expected    2014-08-15 17:24:37 +0900 (883af45)
@@ -0,0 +1,25 @@
+table_create Entries TABLE_PAT_KEY ShortText
+[[0,0.0,0.0],true]
+column_create Entries content COLUMN_SCALAR Text
+[[0,0.0,0.0],true]
+table_create Terms TABLE_PAT_KEY|KEY_NORMALIZE ShortText --default_tokenizer TokenBigram
+[[0,0.0,0.0],true]
+column_create Terms entries_content_index COLUMN_INDEX|WITH_POSITION Entries content
+[[0,0.0,0.0],true]
+load --table Entries
+[
+{"_key":    "The first post!",
+ "content": "Welcome! This is my first post!"},
+{"_key":    "Groonga",
+ "content": "I started to use groonga. It's very fast!"},
+{"_key":    "Mroonga",
+ "content": "I also started to use mroonga. It's also very fast! Really fast!"},
+{"_key":    "Good-bye Senna",
+ "content": "I migrated all Senna system!"},
+{"_key":    "Good-bye Tritonn",
+ "content": "I also migrated all Tritonn system!"}
+]
+[[0,0.0,0.0],5]
+select Entries --match_columns content --query '(star'
+[[[-63,0.0,0.0],"Syntax error: <(star||>"],[]]
+#|e| Syntax error: <(star||>

  Added: test/command/suite/select/query/invalid/missing_close_parenthesis.test (+21 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/query/invalid/missing_close_parenthesis.test    2014-08-15 17:24:37 +0900 (187cebc)
@@ -0,0 +1,21 @@
+table_create Entries TABLE_PAT_KEY ShortText
+column_create Entries content COLUMN_SCALAR Text
+
+table_create Terms TABLE_PAT_KEY|KEY_NORMALIZE ShortText --default_tokenizer TokenBigram
+column_create Terms entries_content_index COLUMN_INDEX|WITH_POSITION Entries content
+
+load --table Entries
+[
+{"_key":    "The first post!",
+ "content": "Welcome! This is my first post!"},
+{"_key":    "Groonga",
+ "content": "I started to use groonga. It's very fast!"},
+{"_key":    "Mroonga",
+ "content": "I also started to use mroonga. It's also very fast! Really fast!"},
+{"_key":    "Good-bye Senna",
+ "content": "I migrated all Senna system!"},
+{"_key":    "Good-bye Tritonn",
+ "content": "I also migrated all Tritonn system!"}
+]
+
+select Entries --match_columns content --query '(star'
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index