/usr/share/doc/libsnmp-session-perl/examples/test-table.pl is in libsnmp-session-perl 1.13-1.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 | #!/usr/bin/perl -w
#
# Regression tests for code used by table walking
require 5.003;
use strict;
use BER;
use SNMP_Session;
&ic_test;
1;
sub ic_test () {
ic_test_1 ("1.2.3","1.2.4",-1);
ic_test_1 ("1.2.3","1.2.3",0);
ic_test_1 ("1.2.4","1.2.3",1);
ic_test_1 ("1.2.29.1","1.2.3.2",1);
ic_test_1 ("1.2.29.1","1.2.3",1);
ic_test_1 ("1.2.29","1.2.3.32",1);
}
sub ic_test_1 ($$$) {
my ($oid1, $oid2, $wanted) = @_;
my $result;
die "index_compare(\"$oid1\",\"$oid2\") == $result, should be $wanted"
unless ($result = index_compare ($oid1,$oid2)) == $wanted;
}
|