Show
Ignore:
Timestamp:
10/19/08 12:31:31 (5 years ago)
Author:
tokuhirom
Message:

works on osx

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/cplusplus/llv8call/trunk/t/100_socket/02_misc.js

    r21608 r21609  
    1919is(Socket.getservbyname('http', 'tcp'), 80, 'getservbyname'); 
    2020 
    21 is(Socket.getservbyport(80), 'www', 'getservbyport'); 
     21like(Socket.getservbyport(80), /www|http/, 'getservbyport'); 
    2222is(Socket.getservbyport(161), 'snmp', 'getservbyport'); 
    2323is(Socket.getservbyport(161, 'udp'), 'snmp', 'getservbyport(snmp,udp)'); 
    24 is(Socket.getservbyport(80, 'tcp'), 'www', 'getservbyport'); 
     24like(Socket.getservbyport(80, 'tcp'), /www|http/, 'getservbyport'); 
    2525 
    2626is(Socket.inet_pton(Socket.AF_INET, "127.0.0.1"), "\x7f\x00\x00\x01", "inet_pton"); 
     
    2828is(Socket.inet_ntop(Socket.AF_INET, Socket.inet_pton(Socket.AF_INET, "127.0.0.1")), "127.0.0.1", "inet_[pn]to[np]"); 
    2929 
    30 is(JSON.stringify(Socket.getaddrinfo('example.com', 80, Socket.AF_INET, Socket.SOCK_STREAM, 0, Socket.AI_CANONNAME)), '[[2,1,6,"www.example.com",["208.77.188.166",80]]]', 'getaddrinfo'); 
    31 is(JSON.stringify(Socket.getaddrinfo('example.com', 80)), '[[2,1,6,null,["208.77.188.166",80]],[2,2,17,null,["208.77.188.166",80]]]', 'getaddrinfo'); 
     30like(JSON.stringify(Socket.getaddrinfo('example.com', 80, Socket.AF_INET, Socket.SOCK_STREAM, 0, Socket.AI_CANONNAME)), /[[2,1,6,"(www.)?example.com",["208.77.188.166",80]]]/, 'getaddrinfo'); 
     31like(JSON.stringify(Socket.getaddrinfo('example.com', 80)), /\[2,1,6,null,\["208.77.188.166",80\]\]/, 'getaddrinfo'); 
     32like(JSON.stringify(Socket.getaddrinfo('example.com', 80)), /\[2,2,17,null,\["208.77.188.166",80\]\]/, 'getaddrinfo'); 
    3233 
    33 is(JSON.stringify(Socket.gethostbyaddr('127.0.0.1')), '["localhost",[],["127.0.0.1"]]', 'gethostbyaddr'); 
     34like(JSON.stringify(Socket.gethostbyaddr('127.0.0.1')), /\["[a-z0-9\.]+",\[\],\["127.0.0.1"\]\]/, 'gethostbyaddr');