diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-10-05 16:34:19 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-12-22 11:56:35 +0100 |
| commit | 4efd8084ecf47132ba51577ee3f79d2ed2637b44 (patch) | |
| tree | 09f6c30c079be1de57af19c450dd6cb5fa4ff036 /core/text.c | |
| parent | cca3d303023d53b5d0af96751f379b2d0e28cd18 (diff) | |
| download | vis-4efd8084ecf47132ba51577ee3f79d2ed2637b44.tar.gz vis-4efd8084ecf47132ba51577ee3f79d2ed2637b44.tar.xz | |
test/core: tweak tests to work with tis-interpreter
$ tis-inertpreter.sh --cc "-I. -I../.." text.c ../../text.c
or more conveniently
$ make tis
Diffstat (limited to 'core/text.c')
| -rw-r--r-- | core/text.c | 14 |
1 files changed, 8 insertions, 6 deletions
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 <ccan/tap/tap.h> #include <stddef.h> #include <stdbool.h> #include <string.h> #include <errno.h> #include <stdio.h> #include <unistd.h> +#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); |
