Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/PVS/Sturm/   (PVS Prover Version 6.0.9©)  Datei vom 6.10.2014 mit Größe 5 kB image not shown  

Impressum appcast.test.ts   Interaktion und
PortierbarkeitJAVA

 

import { readFileSync } from "node:fs";
import { describe, expect, it } from "vitest";
import { canonicalSparkleBuildFromVersion } from "../scripts/sparkle-build.ts";

const APPCAST_URL = new URL("../appcast.xml", import.meta.url);

type AppcastItem = {
  raw: string;
  shortVersion: string | null;
  sparkleVersion: number | null;
};

function parseItems(appcast: string): AppcastItem[] {
  return [...appcast.matchAll(/<item>([\s\S]*?)<\/item>/g)].map((match) => {
    const raw = match[1] ?? "";
    const shortVersion =
      raw.match(/<sparkle:shortVersionString>([^<]+)<\/sparkle:shortVersionString>/)?.[1] ?? null;
    const sparkleVersionText = raw.match(/<sparkle:version>([^<]+)<\/sparkle:version>/)?.[1] ?? "";
    const sparkleVersion = Number.parseInt(sparkleVersionText, 10);
    return {
      raw,
      shortVersion,
      sparkleVersion: Number.isFinite(sparkleVersion) ? sparkleVersion : null,
    };
  });
}

describe("appcast.xml", () => {
  it("keeps every appcast entry on the canonical sparkle build for its version", () => {
    const appcast = readFileSync(APPCAST_URL, "utf8");
    const items = parseItems(appcast);
    expect(items.length).toBeGreaterThan(0);

    for (const item of items) {
      expect(item.shortVersion, item.raw).not.toBeNull();
      expect(item.sparkleVersion, item.raw).not.toBeNull();
      expect(item.sparkleVersion).toBe(canonicalSparkleBuildFromVersion(item.shortVersion!));
    }
  });

  it("keeps the first stable appcast entry aligned with the newest stable build", () => {
    const appcast = readFileSync(APPCAST_URL, "utf8");
    const stableItems = parseItems(appcast).filter(
      (item) => item.sparkleVersion !== null && item.sparkleVersion % 100 === 90,
    );

    expect(stableItems.length).toBeGreaterThan(0);
    const firstStable = stableItems[0];
    const newestStable = [...stableItems].toSorted(
      (left, right) => (right.sparkleVersion ?? 0) - (left.sparkleVersion ?? 0),
    )[0];

    expect(firstStable.sparkleVersion).toBe(newestStable.sparkleVersion);
    expect(firstStable.shortVersion).toBe(newestStable.shortVersion);
  });
});

Messung V0.5 in Prozent
C=100 H=93 G=96

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.11Angebot  (Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-27) ¤

*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.