persona-community-5/.pnpm-store/v3/files/07/0c294875dfd22c30d85511c6a1d20c7e0852e035eb2c01fbbd2d877d8b69826194436cf13a32e1b5a1b9a0bd07187f25b04569155ccd96ed97b7a93ce64050
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

59 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var chai_1 = require("chai");
var YAML = require("../src/");
var util = require("./testUtil");
suite('YAML Syntax', function () {
test('Allow astral characters', function () {
var key = '𝑘𝑒𝑦';
var value = '𝑣𝑎𝑙𝑢𝑒';
var document = YAML.safeLoad(key + ": " + value);
chai_1.assert.deepEqual(document.mappings[0].key.value, key);
chai_1.assert.deepEqual(document.mappings[0].value.value, value);
});
test('Forbid non-printable characters', function () {
testErrors('\x01', [{
line: 1,
column: 0,
message: 'the stream contains non-printable characters',
isWarning: false
}]);
testErrors('\x7f', [{
line: 1,
column: 0,
message: 'the stream contains non-printable characters',
isWarning: false
}]);
testErrors('\x9f', [{
line: 1,
column: 0,
message: 'the stream contains non-printable characters',
isWarning: false
}]);
});
test('Forbid lone surrogates', function () {
testErrors('\udc00\ud800', [{
line: 1,
column: 0,
message: 'the stream contains non-printable characters',
isWarning: false
}]);
});
test('Allow non-printable characters inside quoted scalars', function () {
var key = '"\x7f\x9f\udc00\ud800"';
var document = YAML.safeLoad(key);
chai_1.assert.deepEqual(document.value, '\x7f\x9f\udc00\ud800');
});
test('Forbid control sequences inside quoted scalars', function () {
testErrors('"\x03"', [{
line: 0,
column: 2,
message: 'expected valid JSON character',
isWarning: false
}]);
});
});
function testErrors(input, expectedErrors) {
util.testErrors(input, expectedErrors);
}
//# sourceMappingURL=characterSet.test.js.map