Orbit/vendor/plugins/radius/test/ord_string_test.rb

18 lines
362 B
Ruby
Raw Normal View History

2011-02-24 02:48:21 +00:00
require 'test/unit'
require 'radius'
class RadiusOrdStringTest < Test::Unit::TestCase
def test_string_slice_integer
str = Radius::OrdString.new "abc"
assert_equal str[0], 97
assert_equal str[1], 98
assert_equal str[2], 99
end
def test_string_slice_range
str = Radius::OrdString.new "abc"
assert_equal str[0..-1], "abc"
end
end