Change 11786 by sky@sky-lab on 2001/08/29 10:28:14

        Added three tests to test inet_ntoa/inet_aton and *packaddr*
        Trying to catch errors on HP-UX

Affected files ...

... //depot/perl/ext/Socket/Socket.t#2 edit

Differences ...

==== //depot/perl/ext/Socket/Socket.t#2 (xtext) ====
Index: perl/ext/Socket/Socket.t
--- perl/ext/Socket/Socket.t.~1~        Wed Aug 29 04:45:05 2001
+++ perl/ext/Socket/Socket.t    Wed Aug 29 04:45:05 2001
@@ -13,7 +13,7 @@
        
 use Socket;
 
-print "1..8\n";
+print "1..11\n";
 
 if (socket(T,PF_INET,SOCK_STREAM,6)) {
   print "ok 1\n";
@@ -85,3 +85,14 @@
 use warnings 'Socket' ;
 sockaddr_in(1,2,3,4,5,6) ;
 print ($w == 1 ? "ok 8\n" : "not ok 8\n") ;
+
+# Thest that whatever we give into pack/unpack_sockaddr retains
+# the value thru the entire chain.
+if((inet_ntoa((unpack_sockaddr_in(pack_sockaddr_in(100,inet_aton("10.250.230.10"))))[1]))
+ eq '10.250.230.10') {
+    print "ok 9\n"; 
+} else {
+    print "not ok 9\n"; 
+}
+print ((inet_aton(10.10.10.10) == v10.10.10.10) ? "ok 10\n" : "not ok 10\n");
+print ((inet_ntoa(v10.10.10.10) eq '10.10.10.10') ? "ok 11\n" : "not ok 11\n");
+
End of Patch.

Reply via email to