Skip to content

Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more

1.2 KB
Raw Blame
#!/bin/sh
set -eu

task_developer_dir="${DEVELOPER_DIR:-$(xcode-select -p)}"
case "$task_developer_dir" in
    */Xcode*.app/Contents/Developer) ;;
    *) echo "Set DEVELOPER_DIR to an installed full Xcode before running tests." >&2; exit 1 ;;
esac
export DEVELOPER_DIR="$task_developer_dir"
task_repo_dir=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
task_test_dir=$(mktemp -d /tmp/fluidvoice-paste-cache-tests.XXXXXX)
xcrun swiftc -O \
    "$task_repo_dir/Sources/Fluid/Services/PasteKeyCodeCache.swift" \
    "$task_repo_dir/Tests/PasteKeyCodeCacheRegressionTests.swift" \
    -o "$task_test_dir/paste-cache-tests"
"$task_test_dir/paste-cache-tests"
xcrun swiftc -O \
    "$task_repo_dir/Sources/Fluid/Services/PasteKeyCodeResolver.swift" \
    "$task_repo_dir/Tests/PasteKeyCodeResolverTests.swift" \
    -o "$task_test_dir/paste-resolver-tests"
"$task_test_dir/paste-resolver-tests"
if [ "${1:-}" = "--live" ]; then
    xcrun swiftc -O \
        "$task_repo_dir/Sources/Fluid/Services/PasteKeyCodeCache.swift" \
        "$task_repo_dir/Sources/Fluid/Services/PasteKeyCodeResolver.swift" \
        "$task_repo_dir/Tests/PasteKeyCodeCacheLiveLayoutTests.swift" \
        -o "$task_test_dir/paste-live-tests"
    "$task_test_dir/paste-live-tests"
fi