Mercurial > hg > chronicle
comparison 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 |
comparison
equal
deleted
inserted
replaced
41:0b51fe9c2662 | 42:e19fcf87da87 |
---|---|
1 #!/usr/bin/perl -w | |
2 # | |
3 # Test that the POD we include in our scripts is valid, via the external | |
4 # podcheck command. | |
5 # | |
6 # Steve | |
7 # -- | |
8 # $Id: pod-check.t,v 1.1 2007-10-10 10:06:24 steve Exp $ | |
9 # | |
10 | |
11 use strict; | |
12 use Test::More qw( no_plan ); | |
13 | |
14 foreach my $file ( qw! ./bin/chronicle ! ) | |
15 { | |
16 ok( -e $file, "$file" ); | |
17 ok( -x $file, " File is executable: $file" ); | |
18 ok( ! -d $file, " File is not a directory: $file" ); | |
19 | |
20 if ( ( -x $file ) && ( ! -d $file ) ) | |
21 { | |
22 # | |
23 # Execute the command giving STDERR to STDOUT where we | |
24 # can capture it. | |
25 # | |
26 my $cmd = "podchecker $file"; | |
27 my $output = `$cmd 2>&1`; | |
28 chomp( $output ); | |
29 | |
30 is( $output, "$file pod syntax OK.", " File has correct POD syntax: $file" ); | |
31 } | |
32 } | |
33 |