From 4efd8084ecf47132ba51577ee3f79d2ed2637b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 5 Oct 2016 16:34:19 +0200 Subject: test/core: tweak tests to work with tis-interpreter $ tis-inertpreter.sh --cc "-I. -I../.." text.c ../../text.c or more conveniently $ make tis --- core/text.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'core/text.c') diff --git a/core/text.c b/core/text.c index 01aa322..8145394 100644 --- a/core/text.c +++ b/core/text.c @@ -1,10 +1,10 @@ -#include #include #include #include #include #include #include +#include "tap.h" #include "text.h" #include "text-util.h" @@ -32,12 +32,14 @@ int main(int argc, char *argv[]) { plan_no_plan(); - txt = text_load("/"); - ok(txt == NULL && errno == EISDIR, "Opening directory"); + skip_if(TIS_INTERPRETER, 2, "I/O related") { + txt = text_load("/"); + ok(txt == NULL && errno == EISDIR, "Opening directory"); - if (access("/etc/shadow", F_OK) == 0) { - txt = text_load("/etc/shadow"); - ok(txt == NULL && errno == EACCES, "Opening file without sufficient permissions"); + if (access("/etc/shadow", F_OK) == 0) { + txt = text_load("/etc/shadow"); + ok(txt == NULL && errno == EACCES, "Opening file without sufficient permissions"); + } } txt = text_load(NULL); -- cgit v1.2.3