From 97a6c4d3fe8b2e0a030db073adf9ca2accfcb93a Mon Sep 17 00:00:00 2001 From: Yoni Fogel Date: Tue, 16 Apr 2013 23:57:44 -0400 Subject: [PATCH] Addresses #1531 made test-stat more comprehensive git-svn-id: file:///svn/toku/tokudb@10349 c7de825b-a66e-492c-adef-691d508d4ae1 --- windows/tests/test-stat.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/windows/tests/test-stat.c b/windows/tests/test-stat.c index d05e458885d..21b7da2cebd 100644 --- a/windows/tests/test-stat.c +++ b/windows/tests/test-stat.c @@ -5,26 +5,29 @@ #include #include -void test_stat(char *dirname) { +void test_stat(char *dirname, int result) { int r; struct stat s; r = stat(dirname, &s); - printf("stat %s %d\n", dirname, r); + printf("stat %s %d\n", dirname, r); fflush(stdout); + assert(r==result); } int main(void) { int r; - test_stat("."); + test_stat(".", 0); + test_stat("./", 0); + r = system("rm -rf testdir"); assert(r==0); r = toku_os_mkdir("testdir", S_IRWXU); assert(r == 0); - test_stat("testdir"); + test_stat("testdir", 0); - test_stat("./testdir"); + test_stat("./testdir", 0); - test_stat("./testdir/"); + test_stat("./testdir/", 0); return 0; }