Skip to content

Commit

Permalink
feat(ansi): add more mode test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Dec 10, 2024
1 parent 10bfd4e commit 3863c6a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ansi/mode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ func TestSetMode(t *testing.T) {
modes: []Mode{KeyboardActionMode, CursorKeysMode},
expected: "\x1b[2h\x1b[?1h",
},
{
name: "multiple mixed ANSI and DEC modes",
modes: []Mode{KeyboardActionMode, InsertReplaceMode, CursorKeysMode, AutoWrapMode},
expected: "\x1b[2;4h\x1b[?1;7h",
},
}

for _, tt := range tests {
Expand Down Expand Up @@ -165,6 +170,11 @@ func TestResetMode(t *testing.T) {
modes: []Mode{KeyboardActionMode, CursorKeysMode},
expected: "\x1b[2l\x1b[?1l",
},
{
name: "multiple mixed ANSI and DEC modes",
modes: []Mode{KeyboardActionMode, InsertReplaceMode, CursorKeysMode, AutoWrapMode},
expected: "\x1b[2;4l\x1b[?1;7l",
},
}

for _, tt := range tests {
Expand Down

0 comments on commit 3863c6a

Please sign in to comment.