/
AlexandrNarbaev
/
opencode_initializer
Обзор
Документация
Войти
/
AlexandrNarbaev
/
opencode_initializer
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
tests/unit/test_dotfiles.sh
21 строка
705 B
Alexandr Narbaev
release: v2.0.3 — deep-research findings (10 fixes)
08 авг 2026, 13:25
08 авг 2026, 13:25
f4c2d9b
Код
Авторство
О чём код?
#!/usr/bin/env bash # Unit test for src/lib/27-dotfiles.sh — existence, syntax, key patterns set -euo pipefail P="$(cd "$(dirname "$0")/../.." && pwd)" W="$P/src/lib/27-dotfiles.sh" TP=0; TF=0 a() { local d="$1" c="$2"; if (eval "$c") &>/dev/null; then TP=$((TP+1)); else TF=$((TF+1)); echo " FAIL: $d" >&2; fi } a "exists" "[ -f $W ]" a "syntax" "bash -n $W" a "has chezmoi" "grep -q chezmoi $W" a "has dotfiles" "grep -qi dotfiles $W" a "has chezmoi init" "grep -q 'chezmoi init' $W" a "has brew" "grep -q brew $W" a "has get.chezmoi.io" "grep -q 'get.chezmoi.io' $W" a "has local share" "grep -q 'local/share/chezmoi' $W" echo "test_dotfiles: $TP passed, $TF failed" [ "$TF" -eq 0 ] || exit 1