YUKI Hiroshi
null+****@clear*****
Mon Oct 22 11:44:13 JST 2012
YUKI Hiroshi 2012-10-22 11:44:13 +0900 (Mon, 22 Oct 2012) New Revision: 22352ef83b390f420acb659c10432ad283b2f243 https://github.com/groonga/gcs/commit/22352ef83b390f420acb659c10432ad283b2f243 Log: Add test to send non-ascii SDF batches Modified files: test/gcs-commands.test.js Modified: test/gcs-commands.test.js (+28 -0) =================================================================== --- test/gcs-commands.test.js 2012-10-22 11:42:41 +0900 (ff02ec8) +++ test/gcs-commands.test.js 2012-10-22 11:44:13 +0900 (f7551c6) @@ -943,6 +943,34 @@ suite('gcs-post-sdf', function() { }); }); + test('post add sdf json (non-ascii)', function(done) { + setupDomain(); + var batchFile = path.join(fixturesDirectory, 'non-ascii.add.sdf.json'); + utils + .run('gcs-post-sdf', + '--domain-name', 'companies', + '--source', batchFile, + '--endpoint', endpoint, + '--base-host', 'localhost:' + utils.testPort) + .next(function(result) { + assert.deepEqual({ code: result.code, + message: result.output.stdout }, + { code: 0, + message: + 'Processing: ' + batchFile + '\n' + + 'Detected source format for ' + + 'add.sdf.json as json\n' + + 'Status: success\n' + + 'Added: 10\n' + + 'Deleted: 0\n' }, + result.output.stderr); + done(); + }) + .error(function(e) { + done(e); + }); + }); + test('post delete sdf json', function(done) { setupDomain(); var addBatch = fs.readFileSync(path.join(fixturesDirectory, 'add.sdf.json'), 'UTF-8'); -------------- next part -------------- HTML����������������������������...Download