hello-world/tests/check-page.sh
Peppa 0e0cec0b5e HELLO-1: страница Hello, Dockerfile, проверка
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 14:30:06 +05:00

9 lines
401 B
Bash
Executable File

#!/usr/bin/env bash
# Сценарий «Открытие страницы»: видимый текст страницы — ровно «Hello».
set -euo pipefail
f=public/index.html
[[ -f $f ]] || { echo "нет $f"; exit 1; }
text=$(sed -e '/<head>/,/<\/head>/d' -e 's/<[^>]*>//g' "$f" | tr -d '\n' | xargs)
[[ $text == "Hello" ]] || { echo "видимый текст: '$text'"; exit 1; }
echo ok