Fix crash with set_color --print-colors --background normal

Found in conjunction with #7805.
This commit is contained in:
Fabian Homborg
2021-03-09 13:46:08 +01:00
parent 4762d52e52
commit a7df92e187
2 changed files with 28 additions and 1 deletions

View File

@@ -61,3 +61,24 @@ expect_str("white")
expect_str("yellow")
expect_str("normal")
expect_prompt()
# This used to crash
sendline("set_color --print-colors --background normal")
expect_str("black")
expect_str("blue")
expect_str("brblack")
expect_str("brblue")
expect_str("brcyan")
expect_str("brgreen")
expect_str("brmagenta")
expect_str("brred")
expect_str("brwhite")
expect_str("bryellow")
expect_str("cyan")
expect_str("green")
expect_str("magenta")
expect_str("\n\x1b[31mred")
expect_str("\n\x1b[37mwhite")
expect_str("\n\x1b[33myellow")
expect_str("normal")
expect_prompt()