Test comments.
This commit is contained in:
		
							
								
								
									
										25
									
								
								test/comments.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								test/comments.js
									
									
									
									
									
										Normal 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], ''); | ||||||
|  |     }); | ||||||
|  | }); | ||||||
		Reference in New Issue
	
	Block a user