Mercurial > hg > chronicle
diff tests/pod-check.t @ 42:e19fcf87da87
2007-10-10 10:06:24 by steve
Updated.
author | steve |
---|---|
date | Wed, 10 Oct 2007 10:06:24 +0000 |
parents | |
children | 00ed5b99ccb0 |
line wrap: on
line diff
--- /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" ); + } +} +