@@ -541,7 +541,7 @@ test_expect_success 'prompt - pc mode' '
541541'
542542
543543test_expect_success ' prompt - bash color pc mode - branch name' '
544- printf "BEFORE: (\${__git_ps1_branch_name}):AFTER\\n${c_green}main ${c_clear}" >expected &&
544+ printf "BEFORE: (${c_green}\${__git_ps1_branch_name} ${c_clear}):AFTER\\nmain " >expected &&
545545 (
546546 GIT_PS1_SHOWCOLORHINTS=y &&
547547 __git_ps1 "BEFORE:" ":AFTER" >"$actual" &&
@@ -551,7 +551,7 @@ test_expect_success 'prompt - bash color pc mode - branch name' '
551551'
552552
553553test_expect_success ' prompt - bash color pc mode - detached head' '
554- printf "BEFORE: (\${__git_ps1_branch_name}):AFTER\\n${c_red} (%s...)"${c_clear} $(git log -1 --format="%h" b1^) >expected &&
554+ printf "BEFORE: (${c_red} \${__git_ps1_branch_name}${c_clear} ):AFTER\\n(%s...)" $(git log -1 --format="%h" b1^) >expected &&
555555 git checkout b1^ &&
556556 test_when_finished "git checkout main" &&
557557 (
@@ -563,7 +563,7 @@ test_expect_success 'prompt - bash color pc mode - detached head' '
563563'
564564
565565test_expect_success ' prompt - bash color pc mode - dirty status indicator - dirty worktree' '
566- printf "BEFORE: (\${__git_ps1_branch_name} ${c_red}*${c_clear}):AFTER\\n${c_green}main${c_clear} " >expected &&
566+ printf "BEFORE: (${c_green} \${__git_ps1_branch_name}${c_clear} ${c_red}*${c_clear}):AFTER\\nmain " >expected &&
567567 echo "dirty" >file &&
568568 test_when_finished "git reset --hard" &&
569569 (
@@ -576,7 +576,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirt
576576'
577577
578578test_expect_success ' prompt - bash color pc mode - dirty status indicator - dirty index' '
579- printf "BEFORE: (\${__git_ps1_branch_name} ${c_green}+${c_clear}):AFTER\\n${c_green}main${c_clear} " >expected &&
579+ printf "BEFORE: (${c_green} \${__git_ps1_branch_name}${c_clear} ${c_green}+${c_clear}):AFTER\\nmain " >expected &&
580580 echo "dirty" >file &&
581581 test_when_finished "git reset --hard" &&
582582 git add -u &&
@@ -590,7 +590,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirt
590590'
591591
592592test_expect_success ' prompt - bash color pc mode - dirty status indicator - dirty index and worktree' '
593- printf "BEFORE: (\${__git_ps1_branch_name} ${c_red}*${c_clear}${c_green}+${c_clear}):AFTER\\n${c_green}main${c_clear} " >expected &&
593+ printf "BEFORE: (${c_green} \${__git_ps1_branch_name}${c_clear} ${c_red}*${c_clear}${c_green}+${c_clear}):AFTER\\nmain " >expected &&
594594 echo "dirty index" >file &&
595595 test_when_finished "git reset --hard" &&
596596 git add -u &&
@@ -605,7 +605,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirt
605605'
606606
607607test_expect_success ' prompt - bash color pc mode - dirty status indicator - before root commit' '
608- printf "BEFORE: (\${__git_ps1_branch_name} ${c_green}#${c_clear}):AFTER\\n${c_green}main${c_clear} " >expected &&
608+ printf "BEFORE: (${c_green} \${__git_ps1_branch_name}${c_clear} ${c_green}#${c_clear}):AFTER\\nmain " >expected &&
609609 (
610610 GIT_PS1_SHOWDIRTYSTATE=y &&
611611 GIT_PS1_SHOWCOLORHINTS=y &&
@@ -617,7 +617,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - befo
617617'
618618
619619test_expect_success ' prompt - bash color pc mode - inside .git directory' '
620- printf "BEFORE: (\${__git_ps1_branch_name}):AFTER\\n${c_green}GIT_DIR! ${c_clear}" >expected &&
620+ printf "BEFORE: (${c_green}\${__git_ps1_branch_name} ${c_clear}):AFTER\\nGIT_DIR! " >expected &&
621621 echo "dirty" >file &&
622622 test_when_finished "git reset --hard" &&
623623 (
@@ -631,7 +631,7 @@ test_expect_success 'prompt - bash color pc mode - inside .git directory' '
631631'
632632
633633test_expect_success ' prompt - bash color pc mode - stash status indicator' '
634- printf "BEFORE: (\${__git_ps1_branch_name} ${c_lblue}\$${c_clear}):AFTER\\n${c_green}main${c_clear} " >expected &&
634+ printf "BEFORE: (${c_green} \${__git_ps1_branch_name}${c_clear} ${c_lblue}\$${c_clear}):AFTER\\nmain " >expected &&
635635 echo 2 >file &&
636636 git stash &&
637637 test_when_finished "git stash drop" &&
@@ -645,7 +645,7 @@ test_expect_success 'prompt - bash color pc mode - stash status indicator' '
645645'
646646
647647test_expect_success ' prompt - bash color pc mode - untracked files status indicator' '
648- printf "BEFORE: (\${__git_ps1_branch_name} ${c_red}%%${c_clear}):AFTER\\n${c_green}main${c_clear} " >expected &&
648+ printf "BEFORE: (${c_green} \${__git_ps1_branch_name}${c_clear} ${c_red}%%${c_clear}):AFTER\\nmain " >expected &&
649649 (
650650 GIT_PS1_SHOWUNTRACKEDFILES=y &&
651651 GIT_PS1_SHOWCOLORHINTS=y &&
0 commit comments