- Parse PPD translation strings and decode hex escapes (e.g. CD<2F>DVD -> CD/DVD) - Populate InspectorView media type and tray dropdowns with human-readable titles while preserving computer-readable choice codes - Fix empty-array nil coalescing bug in InspectorView preventing empty tray and media type popups - Support OEM vendor PPD keywords (Canon CNIJMediaType/CNIJMediaSupply, Epson EPIJ_FdSo) - Add dual-identity lookup in PrintEngine and InspectorView for robust choice code vs title resolution - Add comprehensive PPDOptionsTests and CLI test runner Closes #1, Closes #2
39 lines
967 B
Bash
Executable File
39 lines
967 B
Bash
Executable File
#!/bin/bash
|
|
# Standalone test runner for Command Line Tools (no Xcode.app required)
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
SDKROOT="${SDKROOT:-$(xcrun --sdk macosx --show-sdk-path)}"
|
|
SWIFT="${SWIFT:-$(xcrun --find swiftc)}"
|
|
ARCH="$(uname -m)"
|
|
|
|
SOURCES=()
|
|
while IFS= read -r src; do
|
|
if [[ "$(basename "$src")" != "main.swift" ]]; then
|
|
SOURCES+=("$src")
|
|
fi
|
|
done < <(find "$ROOT/Sources" -name '*.swift' | LC_ALL=C sort)
|
|
|
|
SOURCES+=("$ROOT/Tests/TestRunnerMain.swift")
|
|
|
|
BIN="$(mktemp -t tp-test-XXXXXX)"
|
|
trap 'rm -f "$BIN"' EXIT
|
|
|
|
"$SWIFT" \
|
|
-sdk "$SDKROOT" \
|
|
-target "${ARCH}-apple-macos10.15" \
|
|
-swift-version 5 \
|
|
-Onone -g \
|
|
-import-objc-header "$ROOT/Bridging-Header.h" \
|
|
-Xcc "-I${SDKROOT}/usr/include" \
|
|
-framework AppKit \
|
|
-framework Foundation \
|
|
-framework CoreGraphics \
|
|
-framework ImageIO \
|
|
-framework ApplicationServices \
|
|
-lcups \
|
|
-o "$BIN" \
|
|
"${SOURCES[@]}"
|
|
|
|
"$BIN"
|