Sha256: 583d0af5ca6b32d0bbb7b7b702ff1e3bd3ac37c2bf734974a28b35bd072322f9
Contents?: true
Size: 453 Bytes
Versions: 1
Compression:
Stored size: 453 Bytes
Contents
require 'test/unit' require "#{File.dirname(__FILE__)}/../../lib/bencode.rb" class BdecodeStringTest < Test::Unit::TestCase def test_empty assert_equal '', '0:'.bdecode end def test_single_line assert_equal 'foo', '3:foo'.bdecode end def test_multi_line assert_equal "a\nb", "3:a\nb".bdecode end def test_whitespace [" ", "\t", "\n", "\r"].each do |char| assert_equal char, "1:#{char}".bdecode end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bencode-0.5.0 | test/decode/test_string.rb |