| Server IP : 157.230.181.24 / Your IP : 216.73.217.11 Web Server : Apache/2.4.58 (Ubuntu) System : Linux conductive 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64 User : ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/vhosts/convo/node_modules/has-unicode/test/ |
Upload File : |
"use strict"
var test = require("tap").test
var requireInject = require("require-inject")
test("Windows", function (t) {
t.plan(1)
var hasUnicode = requireInject("../index.js", {
os: { type: function () { return "Windows_NT" } }
})
t.is(hasUnicode(), false, "Windows is assumed NOT to be unicode aware")
})
test("Unix Env", function (t) {
t.plan(3)
var hasUnicode = requireInject("../index.js", {
os: { type: function () { return "Linux" } },
child_process: { exec: function (cmd,cb) { cb(new Error("not available")) } }
})
process.env.LANG = "en_US.UTF-8"
process.env.LC_ALL = null
t.is(hasUnicode(), true, "Linux with a UTF8 language")
process.env.LANG = null
process.env.LC_ALL = "en_US.UTF-8"
t.is(hasUnicode(), true, "Linux with UTF8 locale")
process.env.LC_ALL = null
t.is(hasUnicode(), false, "Linux without UTF8 language or locale")
})