metasploit-framework/lib/rex/string_utils.rb.ut.rb

20 lines
389 B
Ruby

#!/usr/bin/ruby
$:.unshift(File.join(File.dirname(__FILE__), '..'))
require 'test/unit'
require 'rex/string_utils'
class Rex::StringUtils::UnitTest < ::Test::Unit::TestCase
Klass = Rex::StringUtils
def klass
self.class::Klass
end
def test_badchar_index
assert_equal(nil, klass.badchar_index('abcdef', 'gzk'))
assert_equal(2, klass.badchar_index('123avd', 'ly3'))
end
end