Skip to content

Commit

Permalink
amend to
Browse files Browse the repository at this point in the history
  • Loading branch information
hasumikin committed Nov 3, 2023
1 parent e7a6d56 commit 5a53084
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reline/face.rb
Expand Up @@ -41,7 +41,7 @@ class Reline::Face
bright_white: 107,
},
style: {
default: 0,
reset: 0,
bold: 1,
faint: 2,
italicized: 3,
Expand Down
11 changes: 11 additions & 0 deletions test/reline/test_face.rb
Expand Up @@ -147,6 +147,17 @@ def test_format_to_sgr
)
end

def test_format_to_sgr_with_reset
assert_equal(
RESET_SGR,
@config.send(:format_to_sgr, style: :reset)
)
assert_equal(
"#{RESET_SGR}\e[37;0;41m",
@config.send(:format_to_sgr, foreground: :white, style: :reset, background: :red)
)
end

def test_format_to_sgr_with_single_style
assert_equal(
"#{RESET_SGR}\e[37;41;1m",
Expand Down

0 comments on commit 5a53084

Please sign in to comment.