|
12 | 12 | @s2.gets.should == "foo\n" |
13 | 13 | end |
14 | 14 |
|
15 | | - it "sets the socket paths to empty Strings" do |
16 | | - @s1.path.should == "" |
17 | | - @s2.path.should == "" |
18 | | - end |
| 15 | + platform_is_not :windows do |
| 16 | + it "sets the socket paths to empty Strings" do |
| 17 | + @s1.path.should == "" |
| 18 | + @s2.path.should == "" |
| 19 | + end |
| 20 | + |
| 21 | + it "sets the socket addresses to empty Strings" do |
| 22 | + @s1.addr.should == ["AF_UNIX", ""] |
| 23 | + @s2.addr.should == ["AF_UNIX", ""] |
| 24 | + end |
19 | 25 |
|
20 | | - it "sets the socket addresses to empty Strings" do |
21 | | - @s1.addr.should == ["AF_UNIX", ""] |
22 | | - @s2.addr.should == ["AF_UNIX", ""] |
| 26 | + it "sets the socket peer addresses to empty Strings" do |
| 27 | + @s1.peeraddr.should == ["AF_UNIX", ""] |
| 28 | + @s2.peeraddr.should == ["AF_UNIX", ""] |
| 29 | + end |
23 | 30 | end |
24 | 31 |
|
25 | | - it "sets the socket peer addresses to empty Strings" do |
26 | | - @s1.peeraddr.should == ["AF_UNIX", ""] |
27 | | - @s2.peeraddr.should == ["AF_UNIX", ""] |
| 32 | + platform_is :windows do |
| 33 | + it "emulates abstract sockets with a temporary file" do |
| 34 | + @s1.path.match?(/\\AppData\\Local\\Temp\\\d+-\d+\.\($\)\z/).should be_true |
| 35 | + @s1.addr.should == ["AF_UNIX", @s1.path] |
| 36 | + @s1.peeraddr.should == ["AF_UNIX", @s1.path] |
| 37 | + |
| 38 | + @s2.path.should == @s1.path |
| 39 | + @s2.addr.should == @s1.addr |
| 40 | + @s2.peeraddr.should == @s1.peeraddr |
| 41 | + end |
28 | 42 | end |
29 | 43 | end |
0 commit comments