(t *testing.T)
| 38 | } |
| 39 | |
| 40 | func TestTablePrinterWithAlternateStyle_Render(t *testing.T) { |
| 41 | d := pterm.TableData{ |
| 42 | {"Firstname", "Lastname", "Email"}, |
| 43 | {"Paul", "Dean", "nisi.dictum.augue@velitAliquam.co.uk"}, |
| 44 | {"Callie", "Mckay", "egestas.nunc.sed@est.com"}, |
| 45 | {"Libby", "Camacho", "aliquet.lobortis@semper.com"}, |
| 46 | } |
| 47 | |
| 48 | // Define the alternate row style |
| 49 | alternateStyle := pterm.NewStyle(pterm.BgDarkGray) |
| 50 | |
| 51 | // Create a printer with the alternate row style |
| 52 | printer := pterm.DefaultTable.WithHasHeader().WithAlternateRowStyle(alternateStyle).WithData(d) |
| 53 | content, err := printer.Srender() |
| 54 | testza.AssertNoError(t, err) |
| 55 | testza.AssertNotNil(t, content) |
| 56 | } |
| 57 | |
| 58 | func TestTablePrinterWithRowSeparators_Render(t *testing.T) { |
| 59 | d := pterm.TableData{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…