From df3e7a600e13d8feaab82063c5b51c0260ad4fb3 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 19 Jun 2022 18:59:01 -0400 Subject: [PATCH] Update Zotero.File.getContentsAsync() tests --- test/tests/data/charsets/windows1252.txt | 2 +- test/tests/fileTest.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/tests/data/charsets/windows1252.txt b/test/tests/data/charsets/windows1252.txt index 92a39f398b..169a44bbba 100644 --- a/test/tests/data/charsets/windows1252.txt +++ b/test/tests/data/charsets/windows1252.txt @@ -1 +1 @@ -é \ No newline at end of file +“é” \ No newline at end of file diff --git a/test/tests/fileTest.js b/test/tests/fileTest.js index 0e4ecad55b..c5926dd560 100644 --- a/test/tests/fileTest.js +++ b/test/tests/fileTest.js @@ -18,8 +18,8 @@ describe("Zotero.File", function () { OS.Path.join(getTestDataDirectory().path, "charsets", "windows1252.txt"), "windows-1252" ); - assert.lengthOf(contents, 1); - assert.equal(contents, "\u00E9"); + assert.lengthOf(contents, 3); + assert.equal(contents, "\u201C\u00E9\u201D"); }) it("should handle a GBK character", function* () { @@ -27,8 +27,8 @@ describe("Zotero.File", function () { OS.Path.join(getTestDataDirectory().path, "charsets", "gbk.txt"), "gbk" ); - assert.lengthOf(contents, 1); - assert.equal(contents, "\u4e02"); + assert.lengthOf(contents, 9); + assert.equal(contents, "这是一个测试文件。"); }) it("should handle an invalid character", function* () {