From 26e2b17a447f76869c661ae37ea82d81979a15b4 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 8 Sep 2013 15:08:29 -0400 Subject: [PATCH] Unit Tests - Fixed bug where version.t would not run unless a .taskrc file existed. --- test/version.t | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/version.t b/test/version.t index d3f6f5579..8b9a443b1 100755 --- a/test/version.t +++ b/test/version.t @@ -28,12 +28,18 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More tests => 2; + +qx{touch version.rc}; my $year = (localtime (time))[5] + 1900; -my $output = qx{../src/task version 2>&1}; +my $output = qx{../src/task rc:version.rc version 2>&1}; like ($output, qr/Copyright \(C\) \d{4} - $year/, 'Copyright is current'); +# Cleanup. +unlink 'version.rc'; +ok (!-r 'version.rc', 'Removed version.rc'); + exit 0;