From 2277c5d7bbe1f9595fad512d8f790708473a9bf1 Mon Sep 17 00:00:00 2001 From: rsc Date: Sun, 21 Mar 2004 04:33:13 +0000 Subject: Small tweaks Lots of new code imported. --- src/lib9p/ftest.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/lib9p/ftest.c (limited to 'src/lib9p/ftest.c') diff --git a/src/lib9p/ftest.c b/src/lib9p/ftest.c new file mode 100644 index 00000000..6692b7f1 --- /dev/null +++ b/src/lib9p/ftest.c @@ -0,0 +1,29 @@ +#include +#include +#include +#include +#include "9p.h" + +void +main(void) +{ + Tree *t; + File *hello, *goodbye, *world; + + t = mktree(); + + hello = fcreate(t->root, "hello", CHDIR|0777); + assert(hello != nil); + + goodbye = fcreate(t->root, "goodbye", CHDIR|0777); + assert(goodbye != nil); + + world = fcreate(hello, "world", 0666); + assert(world != nil); + world = fcreate(goodbye, "world", 0666); + assert(world != nil); + fdump(t->root, 0); + + fremove(world); + fdump(t->root, 0); +} -- cgit v1.2.3