xref: /PHP-8.4/ext/snmp/tests/bug64159.phpt (revision 58043535)
1--TEST--
2Bug #64159: Truncated snmpget
3--CREDITS--
4Boris Lytochkin
5--EXTENSIONS--
6snmp
7--SKIPIF--
8<?php
9require_once(__DIR__.'/skipif.inc');
10?>
11--ENV--
12MIBS=noneXistent
13--FILE--
14<?php
15require_once(__DIR__.'/snmp_include.inc');
16
17snmp_set_quick_print(false);
18snmp_set_valueretrieval(SNMP_VALUE_LIBRARY);
19
20$ext_output = snmpget($hostname, $community, '.1.3.6.1.4.1.2021.8.1.101.1');
21$md5 = md5($ext_output);
22if ($md5 === "ab8283f948419b2d24d22f44a80b17d3") {
23    echo "okay\n";
24} else {
25    echo $ext_output;
26}
27?>
28--EXPECTF--
29MIB search path: %s
30Cannot find module (noneXistent): At line %d in (%s)
31okay
32