(t *testing.T)
| 17 | } |
| 18 | |
| 19 | func TestTablePrinter_Render(t *testing.T) { |
| 20 | d := pterm.TableData{ |
| 21 | {"Firstname", "Lastname", "Email"}, |
| 22 | {"Paul", "Dean", "nisi.dictum.augue@velitAliquam.co.uk"}, |
| 23 | {"Callie", "Mckay", "egestas.nunc.sed@est.com"}, |
| 24 | {"Libby", "Camacho", "aliquet.lobortis@semper.com"}, |
| 25 | } |
| 26 | // WithLeftAlignment |
| 27 | printer := pterm.DefaultTable.WithHasHeader().WithLeftAlignment().WithData(d) |
| 28 | content, err := printer.Srender() |
| 29 | |
| 30 | testza.AssertNoError(t, err) |
| 31 | testza.AssertNotNil(t, content) |
| 32 | // WithRightAlignment |
| 33 | printer = pterm.DefaultTable.WithHasHeader().WithRightAlignment().WithData(d) |
| 34 | content, err = printer.Srender() |
| 35 | |
| 36 | testza.AssertNoError(t, err) |
| 37 | testza.AssertNotNil(t, content) |
| 38 | } |
| 39 | |
| 40 | func TestTablePrinterWithAlternateStyle_Render(t *testing.T) { |
| 41 | d := pterm.TableData{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…