The Swift oracle reads the 43 account files Java read (--email-files, with TopologyRuntimeEmailStorage.decodeJavaServer and decodeJavaClient). The accounts the model takes match Swift's except where Swift checks names, hosts and addresses and fails the whole file on one it rejects, or reads the format otherwise (the first client line instead of the last, exactly nine fields, a required messages field). Every departure is named with its reason; Java's reading is right in each, none is a Java error Swift fixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
1.4 KiB
Bash
Executable File
21 lines
1.4 KiB
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 --vfs /work/packages/core/test/vfs.cases.json /work/packages/core/test/vfs.swift.json
|
|
.build/debug/Oracle --strings /work/packages/core/test/strings.cases.json /work/packages/core/test/strings.swift.json
|
|
.build/debug/Oracle --path-folding /work/packages/fls/test/path-folding.cases.json /work/packages/fls/test/path-folding.swift.json
|
|
.build/debug/Oracle --dns-hosts /work/packages/fls/test/dns-hosts.cases.txt /work/packages/fls/test/dns-hosts.swift.json
|
|
.build/debug/Oracle --email-files server /work/packages/fls/test/email-server.cases.txt /work/packages/fls/test/email-server.swift.json
|
|
.build/debug/Oracle --email-files client /work/packages/fls/test/email-client.cases.txt /work/packages/fls/test/email-client.swift.json'
|