Browse Source

ports tests now all done

tags/0.0.0
Zane C. B-H 1 month ago
parent
commit
1d50265c8e
1 changed files with 13 additions and 3 deletions
  1. 13
    3
      Net-Connection-Match/t/Ports.t

+ 13
- 3
Net-Connection-Match/t/Ports.t View File

@@ -61,7 +61,7 @@ eval{
61 61
 };
62 62
 ok( $returned eq '0', 'match improper ref check') or diag('match accepted a ref other than Net::Connection');
63 63
 
64
-# Create a connection with a matching protocol and see if it matches
64
+# Create a connection with a matching general port and see if it matches
65 65
 my $conn=Net::Connection->new( $connection_args );
66 66
 $returned=0;
67 67
 eval{
@@ -69,7 +69,7 @@ eval{
69 69
 };
70 70
 ok( $returned eq '1', 'port match check') or diag('General port match failed');
71 71
 
72
-# Create a connection with a non-matching protocol and make sure it does not match
72
+# Create a connection with a matching local port and see if it matches
73 73
 $connection_args->{local_port}='53';
74 74
 $conn=Net::Connection->new( $connection_args );
75 75
 $returned=1;
@@ -78,4 +78,14 @@ eval{
78 78
 };
79 79
 ok( $returned eq '1', 'local port match check') or diag('Failed to matching local port');
80 80
 
81
-done_testing(7);
81
+# Create a connection with a matching local port and see if it matches
82
+$connection_args->{local_port}='80';
83
+$connection_args->{foreign_port}='12345';
84
+$conn=Net::Connection->new( $connection_args );
85
+$returned=1;
86
+eval{
87
+	$returned=$checker->match( $conn );
88
+};
89
+ok( $returned eq '1', 'foreign port match check') or diag('Failed to matching foreign port');
90
+
91
+done_testing(8);

Loading…
Cancel
Save