test/test_ber.rb in snmp-0.4.1 vs test/test_ber.rb in snmp-0.5.0
- old
+ new
@@ -1,6 +1,7 @@
require 'test/unit'
+require 'snmp/varbind'
require 'snmp/ber'
class ASN1_Test < Test::Unit::TestCase
include SNMP::BER
@@ -229,8 +230,11 @@
assert_equal("\006\002+\006", encode_object_id([1,3,6]))
assert_equal("\006\003+\202\001", encode_object_id([1,3,257]))
assert_equal("\006\003" << 82.chr << "\202\001", encode_object_id([2,2,257]))
assert_raise(InvalidObjectId) { encode_object_id([3,2,257]) }
assert_raise(InvalidObjectId) { encode_object_id([]) }
+
+ assert_equal("\006\a+\203\377\177\203\377\177",
+ encode_object_id(SNMP::ObjectId.new("1.3.65535.65535")))
end
end