aboutsummaryrefslogtreecommitdiff
path: root/tests/tcolumnize.nim
blob: 950b0402e95ae31b4015b1028c7ca869ce1a4424 (plain)
1
2
3
4
5
6
7
8
9
10
11
import soon/columnize
import std/[unittest, strutils]

test "Testing columize":
  var table = newSeq[seq[string]]()
  let line1 = @["Jan 1", "(OVERDUE)", "Do the thing"]
  let line2 = @["Feb 22", "(Due in 24 days)", "Do that other thing"]
  table.add(line1)
  table.add(line2)
  for line in columnize(table):
    echo line.join(" ")