gilo/terminal/ansi_test.go
Timothy J. Warren 6cdb658d43
Some checks failed
timw4mail/gilo/pipeline/head There was a failure building this commit
Simplify package paths
2021-04-07 13:10:40 -04:00

24 lines
409 B
Go

package terminal
import "testing"
func TestCode(t *testing.T) {
input := "H"
got := Code(input)
want := EscPrefix + input
if got != want {
t.Errorf("Failed to prefix %q with the escape prefix: %q", input, EscPrefix)
}
}
func TestMoveCursor(t *testing.T) {
got := MoveCursor(0, 0)
want := Code("%d;%dH", 1, 1)
if got != want {
t.Errorf("Failed to create escape sequence to move cursor")
}
}