blob: 94f1d31eba29e2fde32e6db7766bae9e66c51f7d (
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, terminal]
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)
|