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