diff options
Diffstat (limited to 'src/tm.nim')
| -rw-r--r-- | src/tm.nim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tm.nim b/src/tm.nim new file mode 100644 index 0000000..26c97f2 --- /dev/null +++ b/src/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" |
