Conditionalize the number of files expected: 14 or 15 depending on if the box has a default my.cnf somewhere.

This commit is contained in:
Daniel Nichter
2012-10-24 13:03:45 -06:00
parent 70b666add9
commit 9b920bc5a5
2 changed files with 26 additions and 18 deletions

View File

@@ -32,13 +32,14 @@ ok(
"Using --save-samples doesn't mistakenly delete the target dir"
);
# If the box has a default my.cnf (e.g. /etc/my.cnf) there
# should be 15 files, else 14.
my @files = glob("$dir/*");
is(
scalar @files,
14,
my $n_files = scalar @files;
ok(
$n_files == 15 || $n_files == 14,
"And leaves all files in there"
);
) or diag($n_files, `ls -l $dir`);
undef($dir);