@@ -21,7 +21,7 @@ func (m *mockModule) View(_, _ int) string { return m.content }
2121func (m * mockModule ) MinSize () (int , int ) { return m .w , m .h }
2222
2323func TestRenderEmpty (t * testing.T ) {
24- result := Render (nil , 2 , 80 , 24 )
24+ result , _ := Render (nil , 2 , 80 , 24 )
2525 if result != "" {
2626 t .Errorf ("expected empty string, got %q" , result )
2727 }
@@ -31,7 +31,7 @@ func TestRenderSingleModule(t *testing.T) {
3131 mods := []module.Module {
3232 & mockModule {name : "TEST" , content : "hello" , w : 20 , h : 3 },
3333 }
34- result := Render (mods , 2 , 80 , 24 )
34+ result , _ := Render (mods , 2 , 80 , 24 )
3535 if result == "" {
3636 t .Fatal ("expected non-empty output" )
3737 }
@@ -50,7 +50,7 @@ func TestRenderMultipleModules(t *testing.T) {
5050 & mockModule {name : "C" , content : "ccc" , w : 20 , h : 3 },
5151 & mockModule {name : "D" , content : "ddd" , w : 20 , h : 3 },
5252 }
53- result := Render (mods , 2 , 100 , 40 )
53+ result , _ := Render (mods , 2 , 100 , 40 )
5454 for _ , name := range []string {"A" , "B" , "C" , "D" } {
5555 if ! strings .Contains (result , name ) {
5656 t .Errorf ("expected %q in output" , name )
@@ -63,7 +63,7 @@ func TestRenderClampsColumns(t *testing.T) {
6363 & mockModule {name : "ONLY" , content : "one" , w : 20 , h : 3 },
6464 }
6565 // 5 columns but only 1 module — should clamp to 1 column
66- result := Render (mods , 5 , 80 , 24 )
66+ result , _ := Render (mods , 5 , 80 , 24 )
6767 if ! strings .Contains (result , "ONLY" ) {
6868 t .Error ("expected module in output even with excess columns" )
6969 }
@@ -74,7 +74,7 @@ func TestRenderMinColumnWidth(t *testing.T) {
7474 & mockModule {name : "NARROW" , content : "x" , w : 20 , h : 3 },
7575 }
7676 // Very narrow terminal — should still render
77- result := Render (mods , 1 , 10 , 24 )
77+ result , _ := Render (mods , 1 , 10 , 24 )
7878 if result == "" {
7979 t .Error ("expected output even with tiny terminal" )
8080 }
@@ -85,7 +85,7 @@ func TestRenderZeroColumns(t *testing.T) {
8585 & mockModule {name : "A" , content : "a" , w : 20 , h : 3 },
8686 }
8787 // 0 columns should be treated as 1
88- result := Render (mods , 0 , 80 , 24 )
88+ result , _ := Render (mods , 0 , 80 , 24 )
8989 if ! strings .Contains (result , "A" ) {
9090 t .Error ("expected module with 0 columns (should default to 1)" )
9191 }
@@ -95,7 +95,7 @@ func TestRenderMinHeight(t *testing.T) {
9595 mods := []module.Module {
9696 & mockModule {name : "TINY" , content : "x" , w : 20 , h : 1 }, // below minimum of 3
9797 }
98- result := Render (mods , 1 , 80 , 24 )
98+ result , _ := Render (mods , 1 , 80 , 24 )
9999 if ! strings .Contains (result , "TINY" ) {
100100 t .Error ("expected module with small min height" )
101101 }
0 commit comments