check_mysql.t 469 B

1234567891011121314151617181920212223242526
  1. #! /usr/bin/perl -w
  2. use strict;
  3. use Helper;
  4. use Cache;
  5. use Test;
  6. use vars qw($tests);
  7. BEGIN {$tests = 2; plan tests => $tests}
  8. exit(0) unless (-x "./check_mysql");
  9. my $null = '';
  10. my $cmd;
  11. my $str;
  12. my $t;
  13. my $mysqlserver = get_option("mysqlserver","host for MYSQL tests");
  14. $cmd = "./check_mysql -H $mysqlserver -P 3306";
  15. $str = `$cmd`;
  16. $t += ok $?>>8,2;
  17. $t += ok $str, '/Access denied for user: /';
  18. exit(0) if defined($Test::Harness::VERSION);
  19. exit($tests - $t);