Skip to content
New issue

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

ouput validation in tests #73

Open
wdpypere opened this issue Jan 28, 2016 · 0 comments
Open

ouput validation in tests #73

wdpypere opened this issue Jan 28, 2016 · 0 comments
Assignees

Comments

@wdpypere
Copy link
Contributor

It would be very nice to be able to do extra validation on generated files in the tests. For instance if you are generating an XML file with metaconfig that you can actually get the output and run it through an XML parser to see if it's valid.
Something for example like:

use Test::More;
use Test::Quattor::TextRender::Metaconfig;
use XML::Parser;

my $u = Test::Quattor::TextRender::Metaconfig->new(
        service => 'some-service',
        )->test();

my $p = XML::Parser->new(Style => 'Tree');
my $t;
eval { $t = $p->parse($u->output); };
ok(! @$, "No XML parsing errors");

done_testing;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants