Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cli/bash/commands/basectl/tests/demo.bats
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,15 @@ EOF
}

@test "Base self-demo pause reads from terminal fd when stdin is redirected" {
local bash_libs_dir
local tty_input="$TEST_TMPDIR/demo-tty"

bash_libs_dir="$(base_bash_libs_fixture_dir)"
printf '\n' > "$tty_input"

run env \
BASE_HOME="$BASE_REPO_ROOT" \
BASE_BASH_LIBS_DIR="${BASE_BASH_LIBS_DIR:-/Users/rameshhp/work/base-bash-libs/lib/bash}" \
BASE_BASH_LIBS_DIR="$bash_libs_dir" \
BASE_DEMO_TTY_FD=9 \
bash -c '
source "$BASE_HOME/demo/demo.sh"
Expand Down
6 changes: 6 additions & 0 deletions tests/test_contract_hardening.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ def test_contract_runner_supports_base_worktree_library_layout() -> None:
assert "../../base-bash-libs/lib/bash" in text


def test_bats_tests_do_not_embed_personal_base_bash_libs_path() -> None:
demo_bats = REPO_ROOT / "cli" / "bash" / "commands" / "basectl" / "tests" / "demo.bats"

assert "/Users/rameshhp/work/base-bash-libs" not in demo_bats.read_text(encoding="utf-8")


def test_contract_runner_reenters_repo_root_for_each_step() -> None:
text = CONTRACT_RUNNER.read_text(encoding="utf-8")

Expand Down
Loading