From 055825766f227df67fa72119a31da109de292c22 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 21 Nov 2010 13:28:17 +0100 Subject: [PATCH] test/t_path.c: added is_file tests. --- test/t_path.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/t_path.c b/test/t_path.c index 456713b..8d0b0fb 100644 --- a/test/t_path.c +++ b/test/t_path.c @@ -51,6 +51,14 @@ void test_isabspath() { assert(is_abspath("/ab/..xy/file") ==1); } +void test_isfile() { + + assert(is_file("t_path.c") == 1); + assert(is_file("file.dontexists") == 0); + assert(is_file("../src") == 0); + assert(is_file("/") == 0); +} + void test_isdir() { assert(is_dir("t_path.c") == 0); @@ -105,6 +113,7 @@ void test_dirname() { int main(int argc, char *argv[]) { test_isabspath(); + test_isfile(); test_isdir(); test_normalize(); test_basename();