File: test-warnings

package info (click to toggle)
libauthen-sasl-xs-perl 1.00-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 456 kB
  • sloc: perl: 241; makefile: 3
file content (32 lines) | stat: -rw-r--r-- 921 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Description: Use warn to report test error messages
Author: Russ Allbery <rra@debian.org>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2023-10-25

Use warn rather than print to report error messages from client or server
negotiation.  print is swallowed by the test harness.

Note:
(libauthen-sasl-xs-perl is the successor of libauthen-sasl-cyrus-perl)
[gregor 2023-10-25]

--- a/t/plain.t
+++ b/t/plain.t
@@ -50,7 +50,7 @@
 		print "Server: Test successful Negotiation succeeded.\n";
 	} else {
 		ok(0);
-		print "Server: Negotiation failed.\n",$conn->error(),"\n";
+		warn "Server: Negotiation failed.\n",$conn->error(),"\n";
 	}
 
 	close FROM_CLIENT;
@@ -82,7 +82,7 @@
 	if ($conn->code == 0) {
 		print "Client: Negotiation succeeded.\n";
 	} else { 
-		print "Client: Negotiation failed.\n",$conn->error,"\n";
+		warn "Client: Negotiation failed.\n",$conn->error,"\n";
 	}
 	
 	close FROM_PARENT;