[libcode-tidyall-perl] 272/374: add util test
Jonas Smedegaard
js at alioth.debian.org
Sun Sep 29 22:26:34 UTC 2013
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository libcode-tidyall-perl.
commit dbae4285a4cafdb312cc6829bccbe66e759feb86
Author: Jonathan Swartz <swartz at pobox.com>
Date: Thu Sep 27 03:21:30 2012 -0700
add util test
---
lib/Code/TidyAll/t/Util.pm | 18 ++++++++++++++++++
t/Util.t | 3 +++
2 files changed, 21 insertions(+)
diff --git a/lib/Code/TidyAll/t/Util.pm b/lib/Code/TidyAll/t/Util.pm
new file mode 100644
index 0000000..ac3f4b1
--- /dev/null
+++ b/lib/Code/TidyAll/t/Util.pm
@@ -0,0 +1,18 @@
+package Code::TidyAll::t::Util;
+use Code::TidyAll::Util qw(dirname tempdir_simple);
+use IPC::System::Simple qw(capturex);
+use Test::Class::Most parent => 'Code::TidyAll::Test::Class';
+
+sub test_tempdir_simple : Tests {
+ return "author testing only" unless ( $ENV{AUTHOR_TESTING} );
+
+ my $dir = capturex(
+ "$^X", "-I",
+ "lib", "-MCode::TidyAll::Util",
+ "-e", "print Code::TidyAll::Util::tempdir_simple "
+ );
+ ok( -d dirname($dir), "parent exists" );
+ ok( !-d $dir, "dir does not exist" );
+}
+
+1;
diff --git a/t/Util.t b/t/Util.t
new file mode 100644
index 0000000..6d6908a
--- /dev/null
+++ b/t/Util.t
@@ -0,0 +1,3 @@
+#!/usr/bin/perl
+use Code::TidyAll::t::Util;
+Code::TidyAll::t::Util->runtests;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcode-tidyall-perl.git
More information about the Pkg-perl-cvs-commits
mailing list