source: trunk/debathena/debathena/libmail-expandaliases-perl/t/expand-alias.t @ 24013

Revision 24013, 750 bytes checked in by broder, 15 years ago (diff)
Create a package for the Mail::ExpandAliases Perl module. This will be used for an updated version of the debathena-msmtp-mta which can understand /etc/aliases files.
Line 
1#!/usr/bin/perl -w
2# ----------------------------------------------------------------------
3# vim: set ft=perl: -*-cperl-*-
4# ----------------------------------------------------------------------
5
6use strict;
7use Config;
8use Test;
9
10my $result;
11my $cmd = "$Config{'perlpath'} -Mblib expand-alias -f t/aliases 2>/dev/null";
12
13BEGIN {
14    plan test => 4;
15}
16
17chomp ($result = `$cmd spam`);
18ok($result, "/dev/null");
19
20chomp ($result = `$cmd tjones`);
21ok($result, 'Tom_Jones@unresolvable.perl.org');
22
23chomp ($result = `$cmd redist`);
24ok($result, '| /path/to/redist');
25
26chomp ($result = `$cmd jones`);
27ok($result, 'Barnaby_Jones@unresolvable.perl.org Bridget_Jones@unresolvable.perl.org Quincy_Jones@unresolvable.perl.org Tom_Jones@unresolvable.perl.org');
Note: See TracBrowser for help on using the repository browser.