diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2005-08-06 06:27:40 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2005-08-06 06:27:40 +0000 |
commit | 3e6da0a081eef2c4498ee045b30392e39a92dc5a (patch) | |
tree | 0e6b676456bab3b466cac7911995a8964deefa27 | |
parent | 7d19ed074bfea793e960c4f86af8085251ba613a (diff) |
Add test for reading values
-rw-r--r-- | common/test_textfile.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/test_textfile.c b/common/test_textfile.c index 88579296..54202d2c 100644 --- a/common/test_textfile.c +++ b/common/test_textfile.c @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) { char filename[] = "/tmp/textfile"; - char key[18], value[512]; + char key[18], value[512], *str; int i, j, fd; fd = creat(filename, 0644); @@ -60,6 +60,10 @@ int main(int argc, char *argv[]) fprintf(stderr, "%s (%d)\n", strerror(errno), errno); break; } + + str = textfile_get(filename, key); + if (!str) + fprintf(stderr, "No value for %s\n", key); } return 0; |