File: test_smi.rb

package info (click to toggle)
libsnmp-ruby 1.0.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,428 kB
  • ctags: 573
  • sloc: ruby: 3,743; makefile: 40; sh: 23
file content (19 lines) | stat: -rw-r--r-- 425 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
require 'test/unit'

begin
    require 'smi'

    class TestSmi < Test::Unit::TestCase
    
        include SNMP::SMI

        def test_load
            name, oid_hash = load_smi_module('test/mibs/IF-MIB')
            assert_equal("IF-MIB", name)
            assert_equal("1.3.6.1.2.1.2.2", oid_hash["ifTable"])
        end

    end
rescue LoadError
    # snmp/smi may not always be available because it is a C extention
end