[gjs] tests: Add a test for importing a module which uses literal UTF-8
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] tests: Add a test for importing a module which uses literal UTF-8
- Date: Mon, 10 Dec 2012 23:39:56 +0000 (UTC)
commit 9ee364ce9bd5f413710b80b410eab56b3bd9a29c
Author: Colin Walters <walters verbum org>
Date: Mon Dec 10 14:36:43 2012 -0500
tests: Add a test for importing a module which uses literal UTF-8
It was claimed to be broken.
https://bugzilla.gnome.org/show_bug.cgi?id=690001
test/js/modules/modunicode.js | 4 ++++
test/js/testImporter.js | 5 +++++
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/test/js/modules/modunicode.js b/test/js/modules/modunicode.js
new file mode 100644
index 0000000..9165e1d
--- /dev/null
+++ b/test/js/modules/modunicode.js
@@ -0,0 +1,4 @@
+// application/javascript;version=1.8
+// This file is written in UTF-8.
+
+const uval = "const â utf8";
diff --git a/test/js/testImporter.js b/test/js/testImporter.js
index 5022105..dd79c85 100644
--- a/test/js/testImporter.js
+++ b/test/js/testImporter.js
@@ -140,4 +140,9 @@ function testImporterEnumerateWithInitFile() {
assertNotEquals(subModules.indexOf('testImporterFunction'), -1);
}
+function testImporterUTF8() {
+ const ModUnicode = imports.modunicode;
+ assertEquals(ModUnicode.uval, "const \u2665 utf8");
+}
+
gjstestRun();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]