diff options
Diffstat (limited to 't/bin.t')
-rw-r--r-- | t/bin.t | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use Test::More tests => 1; @@ -7,14 +7,12 @@ use IO::File; use strict; use warnings; -system "/usr/bin/env > /tmp/fpp"; - my $spamcat = 'bin/spamcat'; my $conffile = 't/fixtures/sample.conf'; # Add testlib which has createdb and possibly population of said db. -my @dumpconfig = `$spamcat -c t/fixtures/sample.conf --dumpconfig`; +my @dumpconfig = `$spamcat -c t/fixtures/sample.conf dumpconfig`; my %got = parse_configdump(@dumpconfig); my %expected = (DBPATH => '/tmp/spamcat.sqlite3', DEFAULT_COUNT => 10, @@ -22,10 +20,10 @@ my %expected = (DBPATH => '/tmp/spamcat.sqlite3', DOMAINS => "spamcat.example.com, spamcat2.example.com, spamcat3"); is_deeply(\%got, \%expected); -# Test for proper delivery. -my $fh = IO::File->new("|$spamcat -c $conffile") || - die "Couldn't open pipe to $spamcat: $!\n"; -$fh->close; +# TODO: Test for proper exit codes. +#my $fh = IO::File->new("|$spamcat -c $conffile") || +# die "Couldn't open pipe to $spamcat: $!\n"; +#$fh->close; sub parse_configdump { my %rc; |