Branch: Tag:

2015-10-25

2015-10-25 18:42:13 by Martin Nilsson <nilsson@fastmail.com>

Use Stdio.Buffer for Bencoding.decode. Slightly laxer at handling truncated data.

31:   test_equal( d("i-3ex"), -3 )   test_equal( d("i1234567890ex"), 1234567890 )   test_equal( d("l4:spam4:eggsex"), ({ "spam", "eggs" }) ) - test_equal( d("l4:spam4:eggs"), 0 ) + test_equal( d("l4:spam4:eggs"), ({ "spam", "eggs" }) )   test_equal( d("d3:cow3:moo4:spam4:eggsex"), ([ "cow":"moo", "spam":"eggs" ]) ) - test_equal( d("d3:cow3:moo4:spam4:eggs"), 0 ) + test_equal( d("d3:cow3:moo4:spam4:eggs"), ([ "cow":"moo", "spam":"eggs" ]) )   test_equal( d("d4:spaml1:a1:bee"), ([ "spam" : ({ "a", "b" }) ]) )   test_eval_error( d("x") )   test_do( add_constant("d") )         END_MARKER