Changeset 21609 for lang/cplusplus/llv8call
- Timestamp:
- 10/19/08 12:31:31 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/cplusplus/llv8call/trunk/t/100_socket/02_misc.js
r21608 r21609 19 19 is(Socket.getservbyname('http', 'tcp'), 80, 'getservbyname'); 20 20 21 is(Socket.getservbyport(80), 'www', 'getservbyport');21 like(Socket.getservbyport(80), /www|http/, 'getservbyport'); 22 22 is(Socket.getservbyport(161), 'snmp', 'getservbyport'); 23 23 is(Socket.getservbyport(161, 'udp'), 'snmp', 'getservbyport(snmp,udp)'); 24 is(Socket.getservbyport(80, 'tcp'), 'www', 'getservbyport');24 like(Socket.getservbyport(80, 'tcp'), /www|http/, 'getservbyport'); 25 25 26 26 is(Socket.inet_pton(Socket.AF_INET, "127.0.0.1"), "\x7f\x00\x00\x01", "inet_pton"); … … 28 28 is(Socket.inet_ntop(Socket.AF_INET, Socket.inet_pton(Socket.AF_INET, "127.0.0.1")), "127.0.0.1", "inet_[pn]to[np]"); 29 29 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'); 30 like(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 like(JSON.stringify(Socket.getaddrinfo('example.com', 80)), /\[2,1,6,null,\["208.77.188.166",80\]\]/, 'getaddrinfo'); 32 like(JSON.stringify(Socket.getaddrinfo('example.com', 80)), /\[2,2,17,null,\["208.77.188.166",80\]\]/, 'getaddrinfo'); 32 33 33 is(JSON.stringify(Socket.gethostbyaddr('127.0.0.1')), '["localhost",[],["127.0.0.1"]]', 'gethostbyaddr');34 like(JSON.stringify(Socket.gethostbyaddr('127.0.0.1')), /\["[a-z0-9\.]+",\[\],\["127.0.0.1"\]\]/, 'gethostbyaddr');
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)