aboutsummaryrefslogtreecommitdiff
path: root/sys/libbio/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/libbio/test.c')
-rw-r--r--sys/libbio/test.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/libbio/test.c b/sys/libbio/test.c
index 00345c4..18bb993 100644
--- a/sys/libbio/test.c
+++ b/sys/libbio/test.c
@@ -47,14 +47,19 @@ main()
{
init();
+ error err;
bio·Tree t;
- Stream *fd;
+ Stream *fd[2];
+
+ fd[0] = io·open("/home/nolln/root/data/test/example.nwk", "r");
+ fd[1] = io·open("/home/nolln/root/data/test/example.proc.nwk", "w");
- fd = io·open("/home/nolln/root/data/test/example.nwk", "r");
printf("starting\n");
- t = bio·readnewick(fd, arena);
- io·close(fd);
+ t = bio·readnewick(fd[0], arena);
+ err = bio·writenewick(t, fd[1]);
printf("ending\n");
+
+ io·close(fd[0]); io·close(fd[1]);
return 0;
}