Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/plttn/tide. 🌊 The ultimate Fish prompt.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546#!/usr/bin/env fish
# Test files named as arguments run alone, e.g.# `mise run test tests/fish_prompt.test.fish`; with none, every test runs.set -l test_files 'tests/**.test.fish'set -q argv[1] && set test_files (string escape -- $argv)
set -l inner_cmd "type -q fisher || begin curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source #when running in CI like GHA, we'll have already installed Fisher so this is a no-op fisher install jorgebucaran/fisherendfisher install . >/dev/nulltype -q mock || fisher install IlanCosman/clownfishfish tests/test_cleanup.fishfish tests/test_setup.fish_tide_remove_unusable_items_tide_cache_variablespython3 littlecheck.py --progress $test_filesset -l test_status \$statusfish tests/test_cleanup.fishexit \$test_status"
# Always run against an isolated HOME so tests can never write into the real# fish config -- even if GITHUB_ACTIONS happens to be set in a local shell# (this previously ran the "normal" branch below unguarded and clobbered a# real ~/.config/fish/fish_variables).if test "$GITHUB_ACTIONS" = true # CI runners are already fresh/ephemeral, so there's nothing worth # caching across runs -- a throwaway dir is enough. set -l test_home (mktemp -d) env HOME=$test_home XDG_CONFIG_HOME=$test_home/.config fish -c $inner_cmdelse # Reuse a persistent HOME across local runs (shared across worktrees) so # fisher/clownfish aren't reinstalled over the network every time. `fisher # install .` still runs unconditionally, so local edits are always synced. # Run `mise run test-clean` to wipe it if it ever gets into a bad state. set -l cache_home $XDG_CACHE_HOME test -n "$cache_home" || set cache_home $HOME/.cache set -l test_home $cache_home/tide-test-home mkdir -p $test_home env HOME=$test_home XDG_CONFIG_HOME=$test_home/.config fish -c $inner_cmdendexit $status