Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 119 lines (114 sloc) 2.061 kb
6a08d50 @gbarr Add new test for constant name bug fixed in r550
gbarr authored
1 #!perl -w
3505b9c @real-dam [PATCH] use of non-localised $_ in Net::LDAP::Constant causes prolems…
real-dam authored
2
3 BEGIN {
4 for (1,2) { require Net::LDAP::Constant; }
5 }
6
6a08d50 @gbarr Add new test for constant name bug fixed in r550
gbarr authored
7 use Net::LDAP::Util qw(ldap_error_name);;
8
9 my @constant = qw(
10 LDAP_SUCCESS
11 LDAP_OPERATIONS_ERROR
12 LDAP_PROTOCOL_ERROR
13 LDAP_TIMELIMIT_EXCEEDED
14 LDAP_SIZELIMIT_EXCEEDED
15 LDAP_COMPARE_FALSE
16 LDAP_COMPARE_TRUE
17 LDAP_STRONG_AUTH_NOT_SUPPORTED
18 LDAP_STRONG_AUTH_REQUIRED
19 LDAP_PARTIAL_RESULTS
20 LDAP_REFERRAL
21 LDAP_ADMIN_LIMIT_EXCEEDED
22 LDAP_UNAVAILABLE_CRITICAL_EXT
23 LDAP_CONFIDENTIALITY_REQUIRED
24 LDAP_SASL_BIND_IN_PROGRESS
25 15
26 LDAP_NO_SUCH_ATTRIBUTE
27 LDAP_UNDEFINED_TYPE
28 LDAP_INAPPROPRIATE_MATCHING
29 LDAP_CONSTRAINT_VIOLATION
30 LDAP_TYPE_OR_VALUE_EXISTS
31 LDAP_INVALID_SYNTAX
32 22
33 23
34 24
35 25
36 26
37 27
38 28
39 29
40 30
41 31
42 LDAP_NO_SUCH_OBJECT
43 LDAP_ALIAS_PROBLEM
44 LDAP_INVALID_DN_SYNTAX
45 LDAP_IS_LEAF
46 LDAP_ALIAS_DEREF_PROBLEM
47 37
48 38
49 39
50 40
51 41
52 42
53 43
54 44
55 45
56 56
57 57
58 LDAP_INAPPROPRIATE_AUTH
59 LDAP_INVALID_CREDENTIALS
60 LDAP_INSUFFICIENT_ACCESS
61 LDAP_BUSY
62 LDAP_UNAVAILABLE
63 LDAP_UNWILLING_TO_PERFORM
64 LDAP_LOOP_DETECT
65 55
66 56
67 57
68 58
69 59
70 LDAP_SORT_CONTROL_MISSING
71 LDAP_INDEX_RANGE_ERROR
72 62
73 63
74 LDAP_NAMING_VIOLATION
75 LDAP_OBJECT_CLASS_VIOLATION
76 LDAP_NOT_ALLOWED_ON_NONLEAF
77 LDAP_NOT_ALLOWED_ON_RDN
78 LDAP_ALREADY_EXISTS
79 LDAP_NO_OBJECT_CLASS_MODS
80 LDAP_RESULTS_TOO_LARGE
81 LDAP_AFFECTS_MULTIPLE_DSAS
82 72
83 73
84 74
85 75
66b8814 @marschap add error string for LDAP_VLV_ERROR
marschap authored
86 LDAP_VLV_ERROR
6a08d50 @gbarr Add new test for constant name bug fixed in r550
gbarr authored
87 77
88 78
89 79
90 LDAP_OTHER
91 LDAP_SERVER_DOWN
92 LDAP_LOCAL_ERROR
93 LDAP_ENCODING_ERROR
94 LDAP_DECODING_ERROR
95 LDAP_TIMEOUT
96 LDAP_AUTH_UNKNOWN
97 LDAP_FILTER_ERROR
98 LDAP_USER_CANCELED
99 LDAP_PARAM_ERROR
100 LDAP_NO_MEMORY
101 LDAP_CONNECT_ERROR
102 LDAP_NOT_SUPPORTED
103 LDAP_CONTROL_NOT_FOUND
104 LDAP_NO_RESULTS_RETURNED
105 LDAP_MORE_RESULTS_TO_RETURN
106 LDAP_CLIENT_LOOP
107 LDAP_REFERRAL_LIMIT_EXCEEDED
108 );
109
110 print "1..", scalar(@constant),"\n";
111 my $i = 0;
112 while(my $const = $constant[$i]) {
113 my $name = ldap_error_name($i);
114 $const = sprintf("LDAP error code %d(0x%02X)",$i,$i) unless $const =~ /\D/;
115 print "not " if !$name or $name ne $const;
116 ++$i;
117 print "ok $i # $name $const\n";
118 }
Something went wrong with that request. Please try again.