-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix(themes/powerline): restore POWERLINE_PROMPT_FOREGROUND_COLOR support #2384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
bb6a680
e367c40
2f6d2ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # shellcheck shell=bats | ||
|
|
||
| load "${MAIN_BASH_IT_DIR?}/test/test_helper.bash" | ||
|
|
||
| function local_setup_file() { | ||
| setup_libs "colors" | ||
| load "${BASH_IT?}/themes/powerline/powerline.base.bash" | ||
| } | ||
|
|
||
| function local_setup() { | ||
| LEFT_PROMPT="" | ||
| SEGMENTS_AT_LEFT=0 | ||
Check warningCode scanning / shellcheck SC2034 Warning test
SEGMENTS_AT_LEFT appears unused. Verify use (or export if used externally).
|
||
| LAST_SEGMENT_COLOR="" | ||
Check warningCode scanning / shellcheck SC2034 Warning test
LAST_SEGMENT_COLOR appears unused. Verify use (or export if used externally).
|
||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| unset POWERLINE_PROMPT_FOREGROUND_COLOR | ||
| } | ||
|
|
||
| @test "powerline base: __powerline_left_segment omits fg color code when POWERLINE_PROMPT_FOREGROUND_COLOR is unset" { | ||
| __powerline_left_segment "hello|240" | ||
| run printf '%s' "${LEFT_PROMPT}" | ||
| refute_output --partial "38;5;" | ||
| assert_output --partial "48;5;240" | ||
| } | ||
|
|
||
| @test "powerline base: __powerline_left_segment applies POWERLINE_PROMPT_FOREGROUND_COLOR when set" { | ||
| POWERLINE_PROMPT_FOREGROUND_COLOR=15 | ||
| __powerline_left_segment "hello|240" | ||
| run printf '%s' "${LEFT_PROMPT}" | ||
| assert_output --partial "38;5;15" | ||
| assert_output --partial "48;5;240" | ||
| } | ||
|
|
||
| @test "powerline base: __powerline_left_segment fg color changes take effect on each segment" { | ||
| POWERLINE_PROMPT_FOREGROUND_COLOR=7 | ||
Check warningCode scanning / shellcheck SC2034 Warning test
POWERLINE_PROMPT_FOREGROUND_COLOR appears unused. Verify use (or export if used externally).
|
||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| __powerline_left_segment "first|32" | ||
| __powerline_left_segment "second|240" | ||
| run printf '%s' "${LEFT_PROMPT}" | ||
| assert_output --partial "38;5;7" | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.