We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This test does not work for some reason
use Test::More; use Test::MockFile; use Data::Dumper; # Test that Config::MySQL::Reader does not read comments use_ok('Config::MySQL::Reader'); my $cnf = <<INI; [group1] [group1] # comment ; comment path = foo/bar quoted_param = "foo;bar" numerical_param = 12345 string_param = 500M param_with_comment = xyz # abc # e.g. skip-name-resolve param-without-value param-with-two-spaces-after param-with-tabulation-after empty_str "" INI my $random_filename = 'foo.ini'; my $mock_file = Test::MockFile->file($random_filename, $cnf); my $config = Config::MySQL::Reader->read_file($random_filename); my $res = { 'group1' => { 'string_param' => '500M', 'param-with-two-spaces-after' => undef, 'path' => 'foo/bar', 'param-without-value' => undef, 'param_with_comment' => 'xyz', 'param-with-tabulation-after ' => undef, 'empty_str ""' => undef, 'quoted_param' => '"foo;bar"', 'numerical_param' => '12345' } }; is_deeply $config, $res; done_testing;
I haven't fully investigated this problem yet, but quick code analysis of Config::MySQL::Reader show that maybe issue related to IO::File package call
The text was updated successfully, but these errors were encountered:
I can't look right now but if you do use Test::MockFile qw/strict/;, it might tell you the stack for the file call not being caught.
use Test::MockFile qw/strict/;
Sorry, something went wrong.
More simply:
use Test::MockFile; # Test that Config::MySQL::Reader does not read comments use Config::MySQL::Reader (); my $cnf = <<INI; [group1] [group1] # comment ; comment path = foo/bar quoted_param = "foo;bar" numerical_param = 12345 string_param = 500M param_with_comment = xyz # abc # e.g. skip-name-resolve param-without-value param-with-two-spaces-after param-with-tabulation-after empty_str "" INI my $random_filename = '/foo.ini'; my $mock_file = Test::MockFile->file($random_filename, $cnf); my $config = Config::MySQL::Reader->read_file($random_filename);
gets:
$>perl t/tmp.t couldn't read file '/foo.ini': No such file or directory at t/tmp.t line 27.
No branches or pull requests
This test does not work for some reason
I haven't fully investigated this problem yet, but quick code analysis of Config::MySQL::Reader show that maybe issue related to IO::File package call
The text was updated successfully, but these errors were encountered: