Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #865 from komainu8/fix_negative_lookahead_result
regexp test: add a test for negative lookahead Patch by Yasuhiro Horimoto. Thanks!!!
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
test/command/suite/select/filter/regexp/negative_lookahead.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| table_create Memos TABLE_HASH_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| column_create Memos content COLUMN_SCALAR ShortText | ||
| [[0,0.0,0.0],true] | ||
| load --table Memos | ||
| [ | ||
| {"_key": "1", "content": "Groonga"}, | ||
| {"_key": "2", "content": "mruby"} | ||
| ] | ||
| [[0,0.0,0.0],2] | ||
| select Memos --filter 'content @~ "^(?!.*Groonga).*$\"' | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 1 | ||
| ], | ||
| [ | ||
| [ | ||
| "_id", | ||
| "UInt32" | ||
| ], | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "content", | ||
| "ShortText" | ||
| ] | ||
| ], | ||
| [ | ||
| 2, | ||
| "2", | ||
| "mruby" | ||
| ] | ||
| ] | ||
| ] | ||
| ] |
8 changes: 8 additions & 0 deletions
8
test/command/suite/select/filter/regexp/negative_lookahead.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| table_create Memos TABLE_HASH_KEY ShortText | ||
| column_create Memos content COLUMN_SCALAR ShortText | ||
| load --table Memos | ||
| [ | ||
| {"_key": "1", "content": "Groonga"}, | ||
| {"_key": "2", "content": "mruby"} | ||
| ] | ||
| select Memos --filter 'content @~ "^(?!.*Groonga).*$\"' |