File: lj.t

package info (click to toggle)
liblivejournal-perl 1.3-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 256 kB
  • sloc: perl: 757; makefile: 4
file content (37 lines) | stat: -rwxr-xr-x 615 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/perl -w

# $Id: lj.t,v 1.2 2001/03/15 23:11:31 archon Exp $

BEGIN { $| = 1; my $tests = ( $ENV{NO_NETWORK} ? 1 : 3 ); print "1..$tests\n"; }
END {print "not ok 1\n" unless $loaded;}
use LiveJournal;
$loaded = 1;
print "ok 1\n";

exit if $ENV{NO_NETWORK};

# we just want to try login()
my $login = "bogus";
my $pass = "bogus";

print "2..3\n";

my %hash = (
	user => $login,
	password => $pass,
);

my $lj = LiveJournal->new(\%hash);

if ($lj) {
	print "ok 2\n";
	print "3..3\n";
	my $log = $lj->login();
	if ($log) {
		print "ok 3\n";
	} else {
		print "not ok 3\n";
	}
} else {
	print "not ok 2\n";
}