a9845098fc2e2632775d2d4e4251917ba8a20034
[app-lastmsg.git] / t / App-Lastmsg.t
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 use Test::More tests => 2;
6 BEGIN { use_ok('App::Lastmsg') };
7
8 {
9 no warnings 'redefine';
10 *App::Lastmsg::format_time = sub { shift };
11 }
12
13 chdir 't';
14 my $out = '';
15 open my $fh, '>', \$out or die "$!";
16 $App::Lastmsg::OUTPUT_FILEHANDLE = $fh;
17 $0 = 'lastmsg';
18 App::Lastmsg::run;
19
20 is $out, <<'EOF', 'output is correct';
21 user2 user2@example.org 1483182600
22 user1 user1@example.com 1483105440
23 user3 NOT FOUND
24 EOF
This page took 0.023618 seconds and 3 git commands to generate.