aboutsummaryrefslogtreecommitdiff
path: root/test/test_regset.c
diff options
context:
space:
mode:
authorK.Kosako <kosako@sofnec.co.jp>2019-11-12 16:15:51 +0900
committerK.Kosako <kosako@sofnec.co.jp>2019-11-12 16:15:51 +0900
commit96ece732274ce8150caeea435be4bdbebae66844 (patch)
tree6e59a0e0c57f59abf4e95eaed961714d08a5ec1e /test/test_regset.c
parentc84049a25b6e45b04e188851266b061bcf9a928a (diff)
downloadoniguruma-96ece732274ce8150caeea435be4bdbebae66844.zip
oniguruma-96ece732274ce8150caeea435be4bdbebae66844.tar.gz
oniguruma-96ece732274ce8150caeea435be4bdbebae66844.tar.bz2
don't test with file (getdelim() doesn't exist in VisualStudio C compiler)
Diffstat (limited to 'test/test_regset.c')
-rw-r--r--test/test_regset.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_regset.c b/test/test_regset.c
index 014fe3b..497fbd6 100644
--- a/test/test_regset.c
+++ b/test/test_regset.c
@@ -287,6 +287,10 @@ n(int line_no, int n, char* ps[], char* s)
#define N(ps,s) n(__LINE__,ASIZE(ps),ps,s)
#define NZERO(s) n(__LINE__,0,(char** )0,s)
+#ifndef _WIN32
+
+/* getdelim() doesn't exist in Windows */
+
static int
get_all_content_of_file(char* path, char** rs, char** rend)
{
@@ -308,6 +312,7 @@ get_all_content_of_file(char* path, char** rs, char** rend)
*rend = line + len;
return 0;
}
+#endif
#define TEXT_PATH "kofu-utf8.txt"
@@ -417,6 +422,7 @@ main(int argc, char* argv[])
X2(p2, "0123456789", 9, 10);
X2(p7, "abcde 555 qwert", 6, 9);
+#ifndef _WIN32
r = get_all_content_of_file(TEXT_PATH, &s, &end);
if (r == 0) {
fprintf(stdout, "FILE: %s, size: %d\n", TEXT_PATH, (int )(end - s));
@@ -426,6 +432,9 @@ main(int argc, char* argv[])
fprintf(stdout, "Ignore %s\n", TEXT_PATH);
file_exist = 0;
}
+#else
+ file_exist = 0;
+#endif
if (file_exist != 0) {
X2(p2, s, 10, 22);