# HG changeset patch # User steve # Date 1192010784 0 # Node ID e19fcf87da872e6bbe6125c9956f5e51122c29ae # Parent 0b51fe9c2662e3ca14f6a4cdef62934c7ea4053a 2007-10-10 10:06:24 by steve Updated. diff -r 0b51fe9c2662 -r e19fcf87da87 tests/pod-check.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/pod-check.t Wed Oct 10 10:06:24 2007 +0000 @@ -0,0 +1,33 @@ +#!/usr/bin/perl -w +# +# Test that the POD we include in our scripts is valid, via the external +# podcheck command. +# +# Steve +# -- +# $Id: pod-check.t,v 1.1 2007-10-10 10:06:24 steve Exp $ +# + +use strict; +use Test::More qw( no_plan ); + +foreach my $file ( qw! ./bin/chronicle ! ) +{ + ok( -e $file, "$file" ); + ok( -x $file, " File is executable: $file" ); + ok( ! -d $file, " File is not a directory: $file" ); + + if ( ( -x $file ) && ( ! -d $file ) ) + { + # + # Execute the command giving STDERR to STDOUT where we + # can capture it. + # + my $cmd = "podchecker $file"; + my $output = `$cmd 2>&1`; + chomp( $output ); + + is( $output, "$file pod syntax OK.", " File has correct POD syntax: $file" ); + } +} +