chore: mantém ASCII o código dos testes novos

O lang-lint exige que a fonte deste repositório seja ASCII, e os testes
que escrevi usavam acentos em texto de exemplo. Isto teria feito o CI
vermelho.

Onde o acento era só texto de exemplo, foi substituído. Nos dois testes
onde o acento é o que está a ser testado - que um nome de pasta acentuado
sobrevive ao parser, e que uma pasta pode chamar-se "Relatorios de
Marco" - fica escrito como escape Unicode, que mantém o teste a
verificar exactamente a mesma coisa sem pôr o caractere na fonte.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Opus 5 committed 2026-08-22 13:59:34 -03:00
1 parent caec501ec5
commit be933d241c
4 files changed
+27 -20

No files matched your search

+7 -4
View File
@@ -53,8 +53,8 @@ describe("turning a rule into Sieve", () => {
// a script that did not parse - so one apostrophe silently disabled every
// rule the user had.
it("escapes a quote in the value", () => {
const script = buildSieve([rule({ value: 'ele disse "olá"' })]);
expect(script).toContain('\\"olá\\"');
const script = buildSieve([rule({ value: 'ele disse "ola"' })]);
expect(script).toContain('\\"ola\\"');
expect(parseSieve(script)!).toHaveLength(1);
});
@@ -116,9 +116,12 @@ describe("reading rules back out of Sieve", () => {
});
it("round-trips the field and the target folder", () => {
const [read] = parseSieve(buildSieve([rule({ field: "from", target: "Relatórios" })]))!;
// Escaped rather than written as the letter: this repository keeps its
// source ASCII, and an accented folder name still has to survive intact.
const accented = "Relat\u00f3rios";
const [read] = parseSieve(buildSieve([rule({ field: "from", target: accented })]))!;
expect(read.field).toBe("from");
expect(read.target).toBe("Relatórios");
expect(read.target).toBe(accented);
});
// A script written by hand, or by a desktop client over ManageSieve, may use