Test comments.

This commit is contained in:
Ruben Vermeersch 2013-12-17 14:42:55 +01:00
parent aa7297ab21
commit fece11fb52

25
test/comments.js Normal file
View File

@ -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], '');
});
});