chore: import official kitty sources from upstream
Bring the kovidgoyal/kitty codebase in as the base of FWS-Kitty, vendored at upstream commit 91fb38a without its git history.
This commit is contained in:
1134 files changed
+433629
No files matched your search
@@ -0,0 +1,35 @@
|
||||
// License: GPLv3 Copyright: 2026, Kovid Goyal, <kovid at kovidgoyal.net>
|
||||
|
||||
package broadcast
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestLineEdit(t *testing.T) {
|
||||
le := line_edit{}
|
||||
le.on_text("hello")
|
||||
if le.String() != "hello" || le.cursor != 5 {
|
||||
t.Fatalf("insert failed: %q cursor=%d", le.String(), le.cursor)
|
||||
}
|
||||
le.backspace()
|
||||
if le.String() != "hell" {
|
||||
t.Fatalf("backspace failed: %q", le.String())
|
||||
}
|
||||
le.left()
|
||||
le.left()
|
||||
le.on_text("X")
|
||||
if le.String() != "heXll" || le.cursor != 3 {
|
||||
t.Fatalf("mid-insert failed: %q cursor=%d", le.String(), le.cursor)
|
||||
}
|
||||
le.home()
|
||||
if le.cursor != 0 {
|
||||
t.Fatal("home failed")
|
||||
}
|
||||
le.end()
|
||||
if le.cursor != 5 {
|
||||
t.Fatal("end failed")
|
||||
}
|
||||
le.clear()
|
||||
if le.String() != "" || le.cursor != 0 {
|
||||
t.Fatal("clear failed")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user