Files
breeze/tests/locale_zi_test.sh
waoziandClaude Opus 5.5 6f6d19f24d Rename account sync to Mesh
The codex-daochi-client-mesh-client-rename integration, committed as that
task staged it: mesh_client replaces daochi_client, account storage and
tests move to the Mesh names, and docs, locales and CI follow, with
existing accounts, encrypted records and local storage kept compatible.
The task stopped before its dependency versions were pushed; the next
commit moves Breeze to the pushed pins it needs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 13:14:02 -03:00

47 lines
2.5 KiB
Bash

#!/bin/sh
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
bin=${1:-"$root/build/packages/ziran/build/bin"}
kryon=${KRYON_DIR:-"$root/build/packages/kryon"}
toolchain=${ZIRAN_DIR:-"$root/build/packages/ziran"}
work=$root/build/locale-zi-test
mkdir -p "$work/c" "$work/dropdown-c"
"$bin/zi2zir" --check-only --root "$root/src" \
--module-path "$kryon/src/ui" \
--module-path "$toolchain/std" --module-path "$root/build/packages/mesh-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$kryon/src/backend" "$root/src/app/locale.zi"
"$bin/zi2zir" --check-only --root "$root/src" \
--module-path "$kryon/src/ui" \
--module-path "$toolchain/std" --module-path "$root/build/packages/mesh-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$kryon/src/backend" \
"$root/src/app/locale_dropdown.zi"
"$bin/zi2c" --no-main --root "$root/src" \
--module-path "$kryon/src/ui" \
--module-path "$toolchain/std" --module-path "$root/build/packages/mesh-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$kryon/src/backend" \
-o "$work/dropdown-c" "$root/src/app/locale_dropdown.zi"
"${CC:-cc}" -std=c11 -I"$toolchain/include" \
-I"$work/dropdown-c" -c "$work/dropdown-c/app/locale_dropdown.c" \
-o "$work/locale_dropdown.o"
"$bin/zi2c" --no-main --root "$root/tests" \
--module-path "$root/src" \
--module-path "$kryon/src/ui" \
--module-path "$toolchain/std" --module-path "$root/build/packages/mesh-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$kryon/src/backend" \
-o "$work/c" "$root/tests/locale_link_behavior.zi"
mkdir -p "$work/c/app"
cp "$work/c/assets.h" "$work/c/app/assets.h"
python3 "$root/scripts/embed-app-assets.py" "$work/assets.c" "$root"/locales/*.txt
cat > "$work/c/main.c" <<'C'
#include "locale_link_behavior.h"
int main(void) { return Answer() == 42 ? 0 : 1; }
C
"${CC:-cc}" -std=c11 -DZIRAN_BOUNDS_CHECK -ffunction-sections \
-fdata-sections -Wl,--gc-sections -I"$toolchain/include" \
-I"$work/c" -I"$root/src/app" \
"$work/assets.c" \
"$work/c"/*.c -o "$work/test"
env -u DISPLAY -u WAYLAND_DISPLAY LANGUAGE=es_AR.UTF-8 "$work/test"
env -u DISPLAY -u WAYLAND_DISPLAY ZIRAN_BIN="$bin/ziran" \
sh "$root/tests/locale_parser_portability_test.sh"
env -u DISPLAY -u WAYLAND_DISPLAY ZIRAN_BIN="$bin/ziran" \
sh "$root/tests/locale_policy_portability_test.sh"
echo "Inbe locale Ziran/native link test passed"