#!/usr/bin/env perl # # Copyright (c) 2016 Jeff Fearn # Copyright (c) 2026 Alex Muntada # # This is free software; you can redistribute it and/or modify it under # the same terms as Perl itself. See perlartistic. use strict; use warnings; use Test::More tests => 5; use Pod::POM::View::Restructured; my $conv = Pod::POM::View::Restructured->new({namespace => "Pod::POM::View::Restructured"}); isa_ok($conv, 'Pod::POM::View::Restructured'); my $dir = $ENV{AUTOPKGTEST_TMP} ? '/usr/share/perl5' : 'lib'; my $rv = $conv->convert_file("$dir/Pod/POM/View/Restructured.pm"); ok($rv); # An array of RST strings we should get in the output # You will have to escape any quanity chars. e.g. ?, *, etc. my @expected = ( '.. _Pod::POM::View::Restructured:', '.. _Pod::POM::View::Restructured::NAME:', '`Pod::POM `_' ); my $count = 0; foreach my $str (@expected) { cmp_ok($rv->{content}, '=~', $str, "string cmp " . $count++); }