aboutsummaryrefslogtreecommitdiff
path: root/tests/tcolumnize.nim
blob: 15f01712954c32c62374c47072907e7c7a6134aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import soon/columnize
import std/[unittest]

test "Testing columnize":
  var table = newSeq[Line]()

  table.add(Line(columns: @[
    Column(text: "Jan 1", color: fgWhite),
    Column(text: "(OVERDUE)", color: fgRed),
    Column(text: "Do the thing", color: fgBlue)
  ], attachments: @[]))

  table.add(Line(columns: @[
    Column(text: "Feb 22", color: fgWhite),
    Column(text: "(Due in 24 days)", color: fgGreen),
    Column(text: "Do that other thing", color: fgBlue)
  ], attachments: @[]))

  columnize.echo(table)