#!/usr/bin/env bash
# Run from a current-main checkout with dependencies installed.
# ZSH_ROOT points to an installation of the upstream zsh 5.7.1 release.
set -eu
: "${ZSH_ROOT:?Set ZSH_ROOT to the zsh 5.7.1 install prefix}"
"$ZSH_ROOT/bin/zsh" --version
proof_zdotdir=$(mktemp -d)
trap 'rm -f "$proof_zdotdir/.zshrc"; rmdir "$proof_zdotdir"' EXIT
: > "$proof_zdotdir/.zshrc"
export SHELL="$ZSH_ROOT/bin/zsh"
export ZDOTDIR="$proof_zdotdir"
# Omit the host name from captures; the startup file remains empty.
export PS1='%# '
export T3CODE_DEV_SEED=0
export T3_SCENARIO_INHERIT_ENV='T3CODE_DEV_SEED,SHELL,ZDOTDIR,PS1'
vp run scenarios:prove scripts/scenarios/setup-terminal-closes-after-split-prompt.e2e.ts \
  --base c16ad0ce179d46c0ae335e6547e81d1cc3522fda \
  --head 4dcecd1c2ed7c8a9c72090306f0515c1cd397573 \
  --upload-command 'ghdrop upload'
