Merge pull request #135 from openpgpjs/new_line
Add test for RFC compliant new line handling
This commit is contained in:
commit
4cad3c0a44
|
@ -118,7 +118,11 @@ define(function(require) {
|
|||
});
|
||||
|
||||
describe('Encryption', function() {
|
||||
var message = 'Hello, World!',
|
||||
var message = 'asdfs\n\nThursday, Nov 21, 2013 7:38 PM asdf@example.com wrote:\n' +
|
||||
'> asdf\n' +
|
||||
'> \n' +
|
||||
'> Thursday, Nov 21, 2013 7:32 PM asdf@example.com wrote:\n' +
|
||||
'> > secret 3',
|
||||
ciphertext;
|
||||
|
||||
beforeEach(function(done) {
|
||||
|
@ -147,7 +151,7 @@ define(function(require) {
|
|||
it('should work', function(done) {
|
||||
pgp.decrypt(ciphertext, pubkey, function(err, pt) {
|
||||
expect(err).to.not.exist;
|
||||
expect(pt.text).to.equal(message);
|
||||
expect(pt.text).to.equal(message.replace(/\r/g,'').replace(/\n/g,"\r\n"));
|
||||
expect(pt.validSignatures[0]).to.be.true;
|
||||
done();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user