stew

a monorepo of some sort
Log | Files | Refs

commit 2ab08c12342839c5a7475c332802d37dfd66dda6
parent 70f9b17b5faf5b8154c7630c594be7854a86ff6d
Author: Renev Pavel <an2qzavok@gmail.com>
Date:   Sun, 23 Apr 2023 15:24:38 +0000

tablist: actually commit test files

Diffstat:
Asrc/tablist/example.tl | 10++++++++++
Asrc/tablist/mktest | 12++++++++++++
Asrc/tablist/test.c | 17+++++++++++++++++
3 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/src/tablist/example.tl b/src/tablist/example.tl @@ -0,0 +1,10 @@ +wdbentry + uuid \5cb897dd-0fcb-4102-204b-5fdede76930c + name + \Shinju no Nectar + \Nectar of Dharani + \Nectar of Divine Curse + \神呪のネクタール + status \ch 31 + tags \setting:fantasy isekai ecchi smut + type \manga diff --git a/src/tablist/mktest b/src/tablist/mktest @@ -0,0 +1,12 @@ +</$objtype/mkfile + +test:V: $O.test + $O.test + + +$O.test: test.c tablist.h libtablist.a$O + $(CC) test.c + $(LD) -o $O.test test.$O + +libtablist.a$O: tablist.c tablist.h + mk -f mkfile diff --git a/src/tablist/test.c b/src/tablist/test.c @@ -0,0 +1,17 @@ +#include <u.h> +#include <libc.h> +#include "tablist.h" + +void +main(void) +{ + print("~~~testing~~~\n"); + int n, fd; + char buf[4096]; + fd = open("example.tl", OREAD); + if (fd < 0) sysfatal("%r"); + n = readn(fd, buf, 4096); + _tlparse(buf, n); + print("~~~done!~~~\n"); + exits(nil); +}