Files
mdg-filius/tools/swift-oracle/run.sh
T
julian.kiedaischandClaude Opus 5.5 0c843dc3de fix(fls): archive path folding measured against Swift
41 path pairs replayed in the Swift core decide which spellings name
the same file. Two corrections: full Unicode case folding (ß, ligatures,
final sigma, micro, long s) instead of toLowerCase, and width folding of
the whole Halfwidth and Fullwidth Forms block. Swift treats composed and
decomposed spellings as one dictionary key; here the writer refuses both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:09:19 +00:00

16 lines
828 B
Bash
Executable File

#!/bin/sh
# Replays every scenario under packages/core/test/scenarios in the Swift core
# and writes the reference result next to it (<name>.swift.json).
# Needs Docker; the TypeScript tests only read the written files.
set -eu
here="$(cd "$(dirname "$0")" && pwd)"
root="$(cd "$here/../.." && pwd)"
[ -d "$here/Sources/FiliusCore" ] || "$here/fetch-upstream.sh"
# A failed build must stop here: a stale binary would write stale references.
docker run --rm -v "$root:/work" -w /work/tools/swift-oracle swift:6.1-jammy sh -c '
set -e
swift build -q
.build/debug/Oracle /work/packages/core/test/scenarios
.build/debug/Oracle --corpus /work/corpus /work/corpus/corpus.swift.json
.build/debug/Oracle --path-folding /work/packages/fls/test/path-folding.cases.json /work/packages/fls/test/path-folding.swift.json'