require "stringio" require File.dirname(__FILE__) + '/test_helper.rb' class TestBencoding < Test::Unit::TestCase def setup end def test_truth data = ["hello", "bye", 5, { "simon" => 60 }] str = "l5:hello3:byei5ed5:simoni60eee" p str out = Bencoding::Parser.load(StringIO.new(str)) p out assert data == out end end