Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
761218e7
Commit
761218e7
authored
Dec 09, 2017
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip socket tests on Windows platform.
Some test may be OK but we skip everything as a starting point.
parent
b103fa22
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
0 deletions
+23
-0
mrbgems/mruby-socket/test/ipsocket.rb
mrbgems/mruby-socket/test/ipsocket.rb
+4
-0
mrbgems/mruby-socket/test/socket.rb
mrbgems/mruby-socket/test/socket.rb
+4
-0
mrbgems/mruby-socket/test/sockettest.c
mrbgems/mruby-socket/test/sockettest.c
+11
-0
mrbgems/mruby-socket/test/unix.rb
mrbgems/mruby-socket/test/unix.rb
+4
-0
No files found.
mrbgems/mruby-socket/test/ipsocket.rb
View file @
761218e7
unless
SocketTest
.
win?
# Note: most of tests below will fail if UDPSocket is broken.
assert
(
'IPSocket.getaddress'
)
do
...
...
@@ -38,3 +40,5 @@ assert('IPSocket.peeraddr') do
server
.
close
true
end
end
# win?
mrbgems/mruby-socket/test/socket.rb
View file @
761218e7
unless
SocketTest
.
win?
assert
(
'Socket.gethostname'
)
do
assert_true
(
Socket
.
gethostname
.
is_a?
String
)
end
...
...
@@ -32,3 +34,5 @@ assert('Socket#recvfrom') do
c
.
close
rescue
nil
end
end
end
# win?
mrbgems/mruby-socket/test/sockettest.c
View file @
761218e7
...
...
@@ -12,9 +12,20 @@ mrb_sockettest_tmppath(mrb_state *mrb, mrb_value klass)
return
str
;
}
mrb_value
mrb_sockettest_win_p
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
#ifdef _WIN32
return
mrb_true_value
();
#else
return
mrb_false_value
();
#endif
}
void
mrb_mruby_socket_gem_test
(
mrb_state
*
mrb
)
{
struct
RClass
*
c
=
mrb_define_module
(
mrb
,
"SocketTest"
);
mrb_define_class_method
(
mrb
,
c
,
"tmppath"
,
mrb_sockettest_tmppath
,
MRB_ARGS_NONE
());
mrb_define_class_method
(
mrb
,
c
,
"win?"
,
mrb_sockettest_win_p
,
MRB_ARGS_NONE
());
}
mrbgems/mruby-socket/test/unix.rb
View file @
761218e7
unless
SocketTest
.
win?
def
unixserver_test_block
path
=
SocketTest
.
tmppath
File
.
unlink
path
rescue
nil
...
...
@@ -124,3 +126,5 @@ assert('UNIXSocket#recvfrom') do
# a[1][1] would be "" or something
end
end
end
# win?
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment