From b60f679162ba5d6adcd4ed358f2135b644095718 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 7 May 2017 15:49:25 +0200 Subject: [PATCH] advio: add unit test for local files --- tests/unit/advio.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/unit/advio.c b/tests/unit/advio.c index b53ac726a..9b2fefe34 100644 --- a/tests/unit/advio.c +++ b/tests/unit/advio.c @@ -32,6 +32,20 @@ * The Sciebo share is read/write accessible via WebDAV. */ #define BASE_URI "https://1Nrd46fZX8HbggT:badpass@rwth-aachen.sciebo.de/public.php/webdav/node/tests" +Test(advio, local) +{ + AFILE *af; + int ret; + char buf[32]; + + af = afopen("/proc/version", "r"); + cr_assert(af, "Failed to open local file"); + + ret = fscanf(af->file, "%32s", buf); + cr_assert_eq(ret, 1); + cr_assert_str_eq(buf, "Linux"); +} + Test(advio, download) { AFILE *af;