From d5854dd65ddc3ab6638794b2554e7f86a358b89f Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Sun, 12 Jun 2022 15:46:56 -0400 Subject: Add more tests, and fix setting count to 0. --- bin/spamcat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/spamcat b/bin/spamcat index dfc0876..9af410d 100755 --- a/bin/spamcat +++ b/bin/spamcat @@ -101,7 +101,7 @@ if ($#ARGV >= 0) { print "$sender has $count messages remaining.\n"; } elsif ($cmd eq 'set') { my ($sender, $count) = @ARGV; - pod2usage(1) unless $count && $count =~ /\d+/; + pod2usage(1) unless defined($count) && $count =~ /\d+/; $sch->set_count($sender, $count); print "$sender has $count messages remaining.\n"; } else { -- cgit v1.2.3