File: 07utent_methods.t

package info (click to toggle)
libsys-utmp-perl 1.6-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 116 kB
  • ctags: 10
  • sloc: perl: 237; makefile: 40
file content (19 lines) | stat: -rwxr-xr-x 460 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl

use Test::More tests => 7;
use Sys::Utmp;

my $utmp = Sys::Utmp->new();

my $utent = $utmp->getutent();

SKIP: {
	skip "no utmp entries", 7 if ! $utent;
	ok(defined $utent->ut_user(),"ut_user");
	ok(defined $utent->ut_id(),"ut_id");
	ok(defined $utent->ut_line(),"ut_line");
	ok(defined $utent->ut_pid(),"ut_pid");
	ok(defined $utent->ut_type(),"ut_type");
	ok(defined $utent->ut_host(),"ut_host");
	ok(defined $utent->ut_time(),"ut_time");
}