Skip to content

Commit b1642c2

Browse files
committed
Add test with weird characters
1 parent 6910269 commit b1642c2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/mimeparser-unit.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@
281281

282282
node._decodeHeaderCharset.restore();
283283
});
284+
285+
it('should have unicode subject with strange characters', function() {
286+
expect(node._parseHeaderValue('Subject', '=?UTF-8?Q?=CB=86=C2=B8=C3=81=C3=8C=C3=93=C4=B1?=\r\n =?UTF-8?Q?=C3=8F=CB=87=C3=81=C3=9B^=C2=B8\\=C3=81?=\r\n =?UTF-8?Q?=C4=B1=CB=86=C3=8C=C3=81=C3=9B=C3=98^\\?=\r\n =?UTF-8?Q?=CB=9C=C3=9B=CB=9D=E2=84=A2=CB=87=C4=B1?=\r\n =?UTF-8?Q?=C3=93=C2=B8^\\=CB=9C=EF=AC=81^\\=C2=B7\\?=\r\n =?UTF-8?Q?=CB=9C=C3=98^=C2=A3=CB=9C#=EF=AC=81^\\?=\r\n =?UTF-8?Q?=C2=A3=EF=AC=81^\\=C2=A3=EF=AC=81^\\?=').value).to.equal('ˆ¸ÁÌÓıÏˇÁÛ^¸\\ÁıˆÌÁÛØ^\\˜Û˝™ˇıÓ¸^\\˜fi^\\·\\˜Ø^£˜#fi^\\£fi^\\£fi^\\');
287+
});
288+
284289
});
285290

286291
describe('#_parseDate', function() {

0 commit comments

Comments
 (0)