changeset 42:e19fcf87da87

2007-10-10 10:06:24 by steve Updated.
author steve
date Wed, 10 Oct 2007 10:06:24 +0000
parents 0b51fe9c2662
children 8fe001a08717
files tests/pod-check.t
diffstat 1 files changed, 33 insertions(+), 0 deletions(-) [+]
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" );
+    }
+}
+