{ pkgs, lib, }: pkgs.writeShellScript "run_test_description" '' set -e [ "$#" -ne 1 ] && { echo "Usage: $0 "; exit 2 } description="$1" __TEST_TMUX="${lib.getExe pkgs.tmux}" __TEST_TMUX_PANE="__TEST_TMUX_PANE" __TEST_AWK_CLEAN_FILE="${./clean.awk}" . ${./driver.sh} echo "Setting up a session.." if "$__TEST_TMUX" has-session -t "$__TEST_TMUX_PANE"; then echo "Killing old '$__TEST_TMUX_PANE'" "$__TEST_TMUX" kill-session -t "$__TEST_TMUX_PANE" fi "$__TEST_TMUX" new-session -d -s "$__TEST_TMUX_PANE" echo "Initializing pipe.." "$__TEST_TMUX" pipe-pane -t "$__TEST_TMUX_PANE" -o 'cat >>./test.golden' echo "Evaluating description.." __test_eval "$description" "$__TEST_TMUX" pipe-pane -t "$__TEST_TMUX_PANE" ''