check_imap.t 646 B

12345678910111213141516171819202122232425262728293031323334
  1. #! /usr/bin/perl -w
  2. #use strict;
  3. use Cache;
  4. use Test;
  5. use vars qw($tests);
  6. BEGIN {$tests = 3; plan tests => $tests}
  7. my $null = '';
  8. my $cmd;
  9. my $str;
  10. my $t;
  11. $cmd = "./check_imap $Cache::mailhost";
  12. $str = `$cmd`;
  13. $t += ok $?>>8,0;
  14. print "Test was: $cmd\n" if ($?);
  15. $cmd = "./check_imap -H $Cache::mailhost -p 143 -w 9 -c 9 -t 10 -e '* OK'";
  16. $str = `$cmd`;
  17. $t += ok $?>>8,0;
  18. print "Test was: $cmd\n" if ($?);
  19. # Reverse compatibility
  20. $cmd = "./check_imap $Cache::mailhost -p 143 -wt 9 -ct 9 -to 10 -e '* OK'";
  21. $str = `$cmd`;
  22. $t += ok $?>>8,0;
  23. print "Test was: $cmd\n" if ($?);
  24. exit(0) if defined($Test::Harness::VERSION);
  25. exit($tests - $t);