diff options
author | Maximilian Krambach <[email protected]> | 2018-08-30 14:16:13 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-08-30 14:16:13 +0000 |
commit | 87bbe728fa68b0c1a62ead3e48650f8f33883b3f (patch) | |
tree | 6837e6075cb16ae95ca4095b1ae848fbe98c68f1 /lang/js/BrowserTestExtension/tests/decryptTest.js | |
parent | js: decoding of information (diff) | |
download | gpgme-87bbe728fa68b0c1a62ead3e48650f8f33883b3f.tar.gz gpgme-87bbe728fa68b0c1a62ead3e48650f8f33883b3f.zip |
js: tests for file name encoding
--
* BrowsertestExtension/tests/decryptTest.js: There were cases in which
file names returned in a wrong encoding from decryption. The test
cases here are a 'Hello World' in a text file with different names,
then being encrypted with cli gnupg.
Diffstat (limited to 'lang/js/BrowserTestExtension/tests/decryptTest.js')
-rw-r--r-- | lang/js/BrowserTestExtension/tests/decryptTest.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lang/js/BrowserTestExtension/tests/decryptTest.js b/lang/js/BrowserTestExtension/tests/decryptTest.js index 606d96ed..61a3fab9 100644 --- a/lang/js/BrowserTestExtension/tests/decryptTest.js +++ b/lang/js/BrowserTestExtension/tests/decryptTest.js @@ -22,7 +22,7 @@ */ /* global describe, it, before, expect, Gpgmejs */ -/* global bigString, inputvalues, sabotageMsg, binaryData */ +/* global bigString, inputvalues, sabotageMsg, binaryData, filename_files */ describe('Decryption', function () { let context = null; @@ -98,4 +98,17 @@ describe('Decryption', function () { }); }); + for (let i=0; i < filename_files.length; i++) { + it ( + 'decrypted file_names keep correct encoding (' + i + ')', + function (done){ + context.decrypt({ data:filename_files[i].data }) + .then(function (answer){ + expect(answer.file_name).to.equal( + filename_files[i].name); + done(); + }); + }); + } + });
\ No newline at end of file |