Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (31 sloc) 1.472 kb
$OpenBSD$
--- t/002_methods.t.orig Tue Oct 7 18:31:04 2003
+++ t/002_methods.t Sat Sep 8 16:56:26 2012
@@ -18,14 +18,27 @@ my $info = {
name => 'test data'
};
my $files = [{length => 1, path => 'a'}, {length => 2, path => 'b'}];
+my $web_seeds = ['http://www.example.com/path','ftp://ftp.example.com/test/'];
+my $created = time;
my $object = Net::BitTorrent::File->new ();
isa_ok ($object, 'Net::BitTorrent::File', 'empty object');
$object->name($test_string);
is($object->name(), $test_string, 'setting name');
-$object->announce($test_string);
-is($object->announce(), $test_string, 'setting announce');
+$object->comment($test_string);
+is($object->comment(), $test_string, 'setting comment');
+$object->announce_list([$test_string, $test_number]);
+is_deeply($object->announce_list(), [$test_string,$test_number], 'setting announce-list');
+is($object->announce(), $test_string, 'setting announce-list set announce');
+$object->announce($test_string . '2');
+is($object->announce(), $test_string . '2', 'setting announce');
+$object->url_list($web_seeds);
+is($object->url_list, $web_seeds, 'setting url-list');
+$object->creation_date($created);
+is($object->creation_date(), $created, 'setting creation date');
+$object->created_by($test_string);
+is($object->created_by(), $test_string, 'setting created by');
$object->piece_length($test_number);
is($object->piece_length(), $test_number, 'setting piece_length');
$object->length($test_number);
Jump to Line
Something went wrong with that request. Please try again.