aboutsummaryrefslogtreecommitdiff
path: root/t/t.tmac
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-06-21 12:56:03 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-06-21 12:56:03 +0200
commit8e62161e1d1a7f2f3732dfd66f85ecb09fe19c98 (patch)
tree305872c843a72c0bac8e031d384b7276fa361b99 /t/t.tmac
parentd30db1b45a794e6608fdac30d5238930ce414309 (diff)
downloadmk-8e62161e1d1a7f2f3732dfd66f85ecb09fe19c98.tar.gz
Add tests
Diffstat (limited to 't/t.tmac')
-rw-r--r--t/t.tmac24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t.tmac b/t/t.tmac
new file mode 100644
index 0000000..c266c1f
--- /dev/null
+++ b/t/t.tmac
@@ -0,0 +1,24 @@
+.\" start test
+.de test
+. nr t +1
+. tmc test \\nt (\\$*):
+..
+.
+.\" make assertion
+.de assert
+.ie \\$1 \{\
+. tm1 " success
+.\}
+.el \{\
+. tm1 " failure: \\$1
+. nr f +1
+.\}
+..
+.\" end tests
+.de end
+. ie \\nf=0 .tm ** \\nt test(s) finished successfully **
+. el \{
+. ab !! \\nf test(s) failed !!
+. \}
+..
+.