From 36872f5c2e65ffe1570e0f1758833e0253dee9ed Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Sun, 13 May 2018 23:13:04 +0100 Subject: Initial commit --- tm.nim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tm.nim (limited to 'tm.nim') diff --git a/tm.nim b/tm.nim new file mode 100644 index 0000000..26c97f2 --- /dev/null +++ b/tm.nim @@ -0,0 +1,18 @@ +import os + +import lib + +const tmname {.strdefine.}: string = "" + +when tmname.len > 0: + const tmd = parse(slurp(tmname & ".tm")) + if paramCount() >= 1: + echo makeDTM(tmd, paramStr(1)).test(false) + else: + echo "please specify a single string argument" +else: + if paramCount() >= 2: + let tmd = parse(readFile(paramStr(1) & ".tm")) + echo makeDTM(tmd, paramStr(2)).test(true) + else: + echo "please specify a description and string input" -- cgit v1.2.1