mirror of
https://github.com/taigrr/gopher-os
synced 2026-03-21 08:22:38 -07:00
Implement simple terminal
The terminal uses console.Vga as its output device. A proper terminal implementation would be using a console.Console interface as its output. However, at this point we cannot use Go interfaces as the fn pointers in the itables have not been yet initialized. The Go runtime bits that set up the itables need access to a memory allocator, a facility which is not yet provided by the kernel.
This commit is contained in:
@@ -202,3 +202,15 @@ func TestVgaWrite(t *testing.T) {
|
||||
t.Errorf("expected call to Write() to set fb[0] to %d; got %d", expVal, got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestVgaOverrideFb(t *testing.T) {
|
||||
var cons = Vga{}
|
||||
cons.Init()
|
||||
|
||||
fb := []uint16{}
|
||||
cons.OverrideFb(fb)
|
||||
|
||||
if len(cons.fb) != len(fb) {
|
||||
t.Fatalf("expected calling OverrideFb to change the framebuffer for the console")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user