⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1.t

📁 snmp的源代码,已经在我的ubuntu下编译通过
💻 T
字号:
# Before `make install' is performed this script should be runnable with# `make test'. After `make install' it should work as `perl 1.t'########################## change 'tests => 2' to 'tests => last_test_to_print';use Test;BEGIN { plan tests => 2 };# use NetSNMP::TrapReceiver;  # we can't include this directly in a module.ok(1); # If we made it this far, we're ok.  Bogus test!my $fail;foreach my $constname (qw(	NETSNMPTRAPD_AUTH_HANDLER NETSNMPTRAPD_HANDLER_BREAK	NETSNMPTRAPD_HANDLER_FAIL NETSNMPTRAPD_HANDLER_FINISH	NETSNMPTRAPD_HANDLER_OK NETSNMPTRAPD_POST_HANDLER	NETSNMPTRAPD_PRE_HANDLER)) {  next if (eval "my \$a = $constname; 1");  if ($@ =~ /^Your vendor has not defined NetSNMP::TrapReceiver macro $constname/) {    print "# pass: $@";  } else {    print "# fail: $@";    $fail = 1;      }}if ($fail) {  print "not ok 2\n";} else {  print "ok 2\n";}########################## Insert your test code below, the Test::More module is use()ed here so read# its man page ( perldoc Test::More ) for help writing this test script.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -