Skip to content

[BUG] TestTabWithColorBox test fails on macos terminal #29

@nedpals

Description

@nedpals

Describe the bug
When running the test especially on TestTabWithColorBox, it crashes (specifically an out-of-bounds crash)

To Reproduce
Steps to reproduce the behavior:

  1. Test go test -v .
  2. See error

Expected behavior
Successful test

Screenshots / Logs
image

Versions (please complete the following information, if relevant):

  • Software version: dev branch
  • OS: Mac OS 11.6
  • Golang version: 1.19
  • Terminal using and Version: MacOS Terminal 2.11

Additional context
Debugging the text and the separator in runes shows the following results:

color.ClearCode(topBar): [9484 32 66 111 120 32 32 32 32 32 67 76 73 32 32 32 32 32 77 97 107 101 114 32 32 32 128230 32 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9472 9488]
color.ClearCode(title): [66 111 120 32 32 32 67 76 73 32 32 32 32 32 77 97 107 101 114 32 32 32 128230]

the title text in the topbar in []runes (the color.clearCode(topBar)) is 66 111 120 32 32 32 32 32 67 76 73 32 32 32 32 32 77 97 107 101 114 32 32 32 128230
while the separator (the color.clearCode(title)) is 66 111 120 32 32 32 67 76 73 32 32 32 32 32 77 97 107 101 114 32 32 32 128230

if you look at it closely on the first set of 32s the text has 5 32s while the separator has only 3 32s

probably an issue with the ClearCode method

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions