feat: support user preview configuration and document UI

This commit is contained in:
2026-10-05 19:17:27 +05:30
parent ee6186ed0b
commit de8843471b
10 changed files with 210 additions and 80 deletions

View File

@@ -85,6 +85,14 @@ shown="$workdir/show-config"
assert_contains "tty = 2" "$shown"
assert_contains "pam_service" "$shown"
user_config_home="$workdir/config-home"
mkdir -p "$user_config_home/latchd"
sed 's/^tty = 2$/tty = 7/' "$config" >"$user_config_home/latchd/config.toml"
user_shown="$workdir/user-show-config"
HOME="$workdir/home" XDG_CONFIG_HOME="$user_config_home" \
"$binary" --preview --show-config --no-log >"$user_shown"
assert_contains "tty = 7" "$user_shown"
unknown="$workdir/unknown.toml"
printf 'unknown = true\n' >"$unknown"
if "$binary" --preview --no-tui --no-log --config "$unknown" >"$workdir/unknown.out" 2>&1; then