YUKI Hiroshi
null+****@clear*****
Thu Nov 28 20:07:51 JST 2013
YUKI Hiroshi 2013-11-28 20:07:51 +0900 (Thu, 28 Nov 2013) New Revision: b59448cd3e4d5069ac9d2b60fd8cff10f688a77a https://github.com/droonga/fluent-plugin-droonga/commit/b59448cd3e4d5069ac9d2b60fd8cff10f688a77a Message: Add tests around output attribute Added files: test/command/suite/search/array-attribute-label.expected test/command/suite/search/array-attribute-label.test test/command/suite/search/hash-attribute-label.expected test/command/suite/search/hash-attribute-label.test Added: test/command/suite/search/array-attribute-label.expected (+25 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/search/array-attribute-label.expected 2013-11-28 20:07:51 +0900 (d1121b0) @@ -0,0 +1,25 @@ +[ + "droonga.message", + 0, + { + "inReplyTo": null, + "statusCode": 200, + "type": "search.result", + "body": { + "result": { + "count": 9, + "records": [ + { + "section-id": "1.1" + }, + { + "section-id": "1.2" + }, + { + "section-id": "1.3" + } + ] + } + } + } +] Added: test/command/suite/search/array-attribute-label.test (+30 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/search/array-attribute-label.test 2013-11-28 20:07:51 +0900 (6693665) @@ -0,0 +1,30 @@ +#@include fixture/documents.jsons +{ + "type": "search", + "dataset": "Droonga", + "body": { + "queries": { + "result": { + "source": "Sections", + "sortBy": ["_key"], + "output": { + "elements": [ + "startTime", + "elapsedTime", + "count", + "attributes", + "records" + ], + "format": "complex", + "limit": 3, + "attributes": [ + { + "label": "section-id", + "source": "_key" + } + ] + } + } + } + } +} Added: test/command/suite/search/hash-attribute-label.expected (+34 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/search/hash-attribute-label.expected 2013-11-28 20:07:51 +0900 (356c5e4) @@ -0,0 +1,34 @@ +[ + "droonga.message", + 0, + { + "inReplyTo": null, + "statusCode": 200, + "type": "search.result", + "body": { + "result": { + "count": 9, + "records": [ + { + "section-id": "1.1", + "label": "Groonga overview", + "fixed-number": 29, + "fixed-string": "Groonga" + }, + { + "section-id": "1.2", + "label": "Full text search and Instant update", + "fixed-number": 29, + "fixed-string": "Groonga" + }, + { + "section-id: "1.3", + "label": "Column store and aggregate query", + "fixed-number": 29, + "fixed-string": "Groonga" + } + ] + } + } + } +] Added: test/command/suite/search/hash-attribute-label.test (+38 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/search/hash-attribute-label.test 2013-11-28 20:07:51 +0900 (e2cab7d) @@ -0,0 +1,38 @@ +#@include fixture/documents.jsons +{ + "type": "search", + "dataset": "Droonga", + "body": { + "queries": { + "result": { + "source": "Sections", + "sortBy": ["_key"], + "output": { + "elements": [ + "startTime", + "elapsedTime", + "count", + "attributes", + "records" + ], + "format": "complex", + "limit": 3, + "attributes": { + "section-id": { + "source": "_key" + }, + "label": { + "source": "title" + }, + "fixed-number": { + "source": "29" + }, + "fixed-string": { + "source": "\"Groonga\"" + } + } + } + } + } + } +} -------------- next part -------------- HTML����������������������������...Download