Add additional roundtrip to test

This commit is contained in:
Jonathan Rudenberg 2014-07-03 21:12:06 -07:00
parent 63cdf72db2
commit f585254b83
No known key found for this signature in database
GPG Key ID: E38D8C6BAA8C49AA

View File

@ -42,4 +42,12 @@ func (s *S) TestRoundtrip(c *C) {
plaintext, err := dec.Decrypt(ciphertext)
c.Assert(err, IsNil)
c.Assert(plaintext, DeepEquals, plain)
plain[0] = 'Y'
ciphertext, err = enc.Encrypt(nil, nil, plain, 0)
c.Assert(err, IsNil)
plaintext, err = dec.Decrypt(ciphertext)
c.Assert(err, IsNil)
c.Assert(plaintext, DeepEquals, plain)
}