YUKI Hiroshi
null+****@clear*****
Thu Nov 28 19:26:11 JST 2013
YUKI Hiroshi 2013-11-28 19:26:11 +0900 (Thu, 28 Nov 2013) New Revision: 948bfcb079ba82b35f2f6d18127ab25317353ea5 https://github.com/droonga/fluent-plugin-droonga/commit/948bfcb079ba82b35f2f6d18127ab25317353ea5 Message: Add tests for offset and limit Added files: test/command/suite/search/output-range.expected test/command/suite/search/output-range.test test/command/suite/search/sort-and-output-range.expected test/command/suite/search/sort-and-output-range.test test/command/suite/search/sort-range.expected test/command/suite/search/sort-range.test Added: test/command/suite/search/output-range.expected (+28 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/search/output-range.expected 2013-11-28 19:26:11 +0900 (c012e54) @@ -0,0 +1,28 @@ +[ + "droonga.message", + 0, + { + "inReplyTo": null, + "statusCode": 200, + "type": "search.result", + "body": { + "result": { + "count": 9, + "records": [ + [ + "1.3" + ], + [ + "1.4" + ], + [ + "1.5" + ], + [ + "1.6" + ] + ] + } + } + } +] Added: test/command/suite/search/output-range.test (+25 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/search/output-range.test 2013-11-28 19:26:11 +0900 (2bd2d8e) @@ -0,0 +1,25 @@ +#@include fixture/documents.jsons +{ + "type": "search", + "dataset": "Droonga", + "body": { + "queries": { + "result": { + "source": "Sections", + "sortBy": ["_key"], + "output": { + "elements": [ + "startTime", + "elapsedTime", + "count", + "attributes", + "records" + ], + "offset": 2, + "limit": 4, + "attributes": ["_key"] + } + } + } + } +} Added: test/command/suite/search/sort-and-output-range.expected (+25 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/search/sort-and-output-range.expected 2013-11-28 19:26:11 +0900 (3e6106e) @@ -0,0 +1,25 @@ +[ + "droonga.message", + 0, + { + "inReplyTo": null, + "statusCode": 200, + "type": "search.result", + "body": { + "result": { + "count": 9, + "records": [ + [ + "1.3" + ], + [ + "1.4" + ], + [ + "1.5" + ] + ] + } + } + } +] Added: test/command/suite/search/sort-and-output-range.test (+29 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/search/sort-and-output-range.test 2013-11-28 19:26:11 +0900 (da0d115) @@ -0,0 +1,29 @@ +#@include fixture/documents.jsons +{ + "type": "search", + "dataset": "Droonga", + "body": { + "queries": { + "result": { + "source": "Sections", + "sortBy": { + "keys": ["_key"], + "offset": 1, + "limit": 5 + }, + "output": { + "elements": [ + "startTime", + "elapsedTime", + "count", + "attributes", + "records" + ], + "offset": 1, + "limit": 3, + "attributes": ["_key"] + } + } + } + } +} Added: test/command/suite/search/sort-range.expected (+27 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/search/sort-range.expected 2013-11-28 19:26:11 +0900 (a5231e7) @@ -0,0 +1,27 @@ +[ + "droonga.message", + 0, + { + "inReplyTo": null, + "statusCode": 200, + "type": "search.result", + "body": { + "result": { + "count": 9, + "records": [ + [ + "1.7" + ], + [ + "1.6" + ], + [ + "1.5" + ], + [ + "1.4" + ] + } + } + } +] Added: test/command/suite/search/sort-range.test (+28 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/search/sort-range.test 2013-11-28 19:26:11 +0900 (39f1259) @@ -0,0 +1,28 @@ +#@include fixture/documents.jsons +{ + "type": "search", + "dataset": "Droonga", + "body": { + "queries": { + "result": { + "source": "Sections", + "sortBy": { + "keys": ["-_key"], + "offset": 2, + "limit": 4 + }, + "output": { + "elements": [ + "startTime", + "elapsedTime", + "count", + "attributes", + "records" + ], + "limit": -1, + "attributes": ["_key"] + } + } + } + } +} -------------- next part -------------- HTML����������������������������...Download