diff options
| author | Tom Harley | 2018-05-13 23:13:04 +0100 |
|---|---|---|
| committer | Tom Harley | 2018-05-13 23:13:04 +0100 |
| commit | 36872f5c2e65ffe1570e0f1758833e0253dee9ed (patch) | |
| tree | 4d6ef61df030fbf86f148d9a4f4c67f05fba2ec5 /tm.nim | |
| download | machines-36872f5c2e65ffe1570e0f1758833e0253dee9ed.tar.gz machines-36872f5c2e65ffe1570e0f1758833e0253dee9ed.zip | |
Initial commit
Diffstat (limited to 'tm.nim')
| -rw-r--r-- | tm.nim | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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" |
