diff --git a/test/comments.js b/test/comments.js new file mode 100644 index 0000000..6a20563 --- /dev/null +++ b/test/comments.js @@ -0,0 +1,25 @@ +var assert = require('assert'); +var PO = require('..'); + +describe('Message parsing', function () { + var po; + + before(function (done) { + PO.load(__dirname + '/fixtures/big.po', function (err, result) { + assert.equal(err, null); + po = result; + done(); + }); + }); + + it('Parses the po file', function () { + assert.notEqual(po, null); + }); + + it('Parses the comments', function () { + assert.equal(po.comments.length, 3); + assert.equal(po.comments[0], 'French translation of Link (6.x-2.9)'); + assert.equal(po.comments[1], 'Copyright (c) 2011 by the French translation team'); + assert.equal(po.comments[2], ''); + }); +});