mirror of
https://github.com/denoland/deno.git
synced 2024-12-01 16:51:13 -05:00
17 lines
458 B
TypeScript
17 lines
458 B
TypeScript
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|||
|
|
|||
|
import * as punycode from "node:punycode";
|
|||
|
import { assertEquals } from "@std/assert/mod.ts";
|
|||
|
|
|||
|
Deno.test("regression #19214", () => {
|
|||
|
const input = "个<><E4B8AA>.hk";
|
|||
|
|
|||
|
assertEquals(punycode.toASCII(input), "xn--ciq6844ba.hk");
|
|||
|
|
|||
|
assertEquals(punycode.toUnicode("xn--ciq6844ba.hk"), input);
|
|||
|
});
|
|||
|
|
|||
|
Deno.test("Decode empty input", () => {
|
|||
|
assertEquals(punycode.decode(""), "");
|
|||
|
});
|