summaryrefslogtreecommitdiffhomepage
path: root/test/mruby_io_test.c
diff options
context:
space:
mode:
authortakahashim <[email protected]>2015-12-02 21:47:46 +0900
committertakahashim <[email protected]>2015-12-02 21:47:46 +0900
commitb19c315148cfda6d02b4073b4f741d2e4d5e96a7 (patch)
treef959af83ec3d729b2632e93d5955d8e7908a3a75 /test/mruby_io_test.c
parent7337bfa4973a7d17676f160f41dd60f9ae5c3094 (diff)
downloadmruby-b19c315148cfda6d02b4073b4f741d2e4d5e96a7.tar.gz
mruby-b19c315148cfda6d02b4073b4f741d2e4d5e96a7.zip
fix tests for Win: use binary mode
Diffstat (limited to 'test/mruby_io_test.c')
-rw-r--r--test/mruby_io_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/mruby_io_test.c b/test/mruby_io_test.c
index 98ec54524..2777e605e 100644
--- a/test/mruby_io_test.c
+++ b/test/mruby_io_test.c
@@ -53,7 +53,7 @@ mrb_io_test_io_setup(mrb_state *mrb, mrb_value self)
mrb_gv_set(mrb, mrb_intern_cstr(mrb, "$mrbtest_io_socketname"), mrb_str_new_cstr(mrb, socketname));
mrb_gv_set(mrb, mrb_intern_cstr(mrb, "$mrbtest_io_msg"), mrb_str_new_cstr(mrb, msg));
- fp = fopen(rfname, "w");
+ fp = fopen(rfname, "wb");
if (fp == NULL) {
mrb_raise(mrb, E_RUNTIME_ERROR, "can't open temporary file");
return mrb_nil_value();
@@ -61,7 +61,7 @@ mrb_io_test_io_setup(mrb_state *mrb, mrb_value self)
fputs(msg, fp);
fclose(fp);
- fp = fopen(wfname, "w");
+ fp = fopen(wfname, "wb");
if (fp == NULL) {
mrb_raise(mrb, E_RUNTIME_ERROR, "can't open temporary file");
return mrb_nil_value();