mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-09-24 15:49:09 +00:00
8abbd36baf
* Improve group connection defaults * Honor credential inheritance overrides * Preserve default identity inheritance * Handle missing group identities * Clear inherited credential bundles * Reset cleared group identities * Align group credential display * Allow group identity with host username * Preserve group credential overrides * Preserve custom host credentials
22 lines
849 B
TypeScript
22 lines
849 B
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
import {
|
|
getTerminalEncodingOptions,
|
|
resolveTerminalEncodingSelectValue,
|
|
} from "./TerminalEncodingSelect.tsx";
|
|
|
|
test("terminal encoding selector advertises the supported encodings", () => {
|
|
assert.deepEqual(getTerminalEncodingOptions(), ["UTF-8", "GB18030"]);
|
|
});
|
|
|
|
test("terminal encoding selector preserves an existing custom encoding", () => {
|
|
assert.deepEqual(getTerminalEncodingOptions("Shift_JIS"), ["Shift_JIS", "UTF-8", "GB18030"]);
|
|
});
|
|
|
|
test("terminal encoding selector normalizes supported values to their displayed option", () => {
|
|
assert.equal(resolveTerminalEncodingSelectValue("utf-8"), "UTF-8");
|
|
assert.equal(resolveTerminalEncodingSelectValue("gb18030"), "GB18030");
|
|
assert.equal(resolveTerminalEncodingSelectValue("Shift_JIS"), "Shift_JIS");
|
|
});
|