From e0455d13e7075ad24baf479b982d6202dc6df954 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 19 Jan 2021 19:16:17 +0100 Subject: [PATCH] tests/git: Start an interactive fish This makes the fish_git_prompt variable handlers kick in, meaning we see the informative chars. The big question here is what happens if there's a non-UTF-8 locale in the test. Theoretically we set LC_CTYPE, but..... --- tests/checks/git.fish | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/checks/git.fish b/tests/checks/git.fish index 35c7da7e9..6cebc2c4f 100644 --- a/tests/checks/git.fish +++ b/tests/checks/git.fish @@ -1,4 +1,6 @@ -#RUN: %fish %s +#RUN: %fish -i %s +# Note: ^ this is interactive so we test interactive behavior, +# e.g. the fish_git_prompt variable handlers test `status is-interactive`. #REQUIRES: command -v git # Do some tests with `git` - completions are interesting, @@ -31,4 +33,9 @@ echo # the git prompt doesn't print a newline __fish_git_prompt_show_informative_status=1 fish_git_prompt echo -#CHECK: (newbranch %1) +#CHECK: (newbranch|…1) + +# Confirm the mode changes back +fish_git_prompt +echo +#CHECK: (newbranch)