products/Sources/formale Sprachen/GAP/pkg/francy/   (GAP Algebra Version 4.15.1©)  Datei vom 17.3.2023 mit Größe 426 B image not shown  

Quellcode-Bibliothek models-config.file-mode.test.ts

  Interaktion und
PortierbarkeitJAVA
 

import fs from "node:fs/promises";
import path from "node:path";
import { afterEach, describe, expect, it } from "vitest";
import { cleanupTempDirs, makeTempDir } from "../../test/helpers/temp-dir.js";
import {
  ensureModelsFileModeForModelsJson,
  writeModelsFileAtomicForModelsJson,
} from "./models-config.js";

const tempDirs = new Set<string>();

afterEach(() => {
  cleanupTempDirs(tempDirs);
});

describe("models-config file mode", () => {
  it("writes models.json with mode 0600", async () => {
    if (process.platform === "win32") {
      return;
    }
    const dir = makeTempDir(tempDirs, "models-json-mode-");
    const modelsPath = path.join(dir, "models.json");
    await writeModelsFileAtomicForModelsJson(modelsPath, '{"providers":{}}\n');
    const stat = await fs.stat(modelsPath);
    expect(stat.mode & 0o777).toBe(0o600);
  });

  it("repairs models.json mode to 0600 on no-content-change paths", async () => {
    if (process.platform === "win32") {
      return;
    }
    const dir = makeTempDir(tempDirs, "models-json-mode-");
    const modelsPath = path.join(dir, "models.json");
    await writeModelsFileAtomicForModelsJson(modelsPath, '{"providers":{}}\n');
    await fs.chmod(modelsPath, 0o644);

    await ensureModelsFileModeForModelsJson(modelsPath);

    const stat = await fs.stat(modelsPath);
    expect(stat.mode & 0o777).toBe(0o600);
  });
});

Messung V0.5 in Prozent
C=99 H=99 G=98

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.2Bemerkung:  (Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-06-10) ¤

*Eine klare Vorstellung vom Zielzustand






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.