File: dont_overwrite_source.patch

package info (click to toggle)
libxml-rss-libxml-perl 0.3105%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 524 kB
  • ctags: 112
  • sloc: perl: 4,940; sh: 51; xml: 41; makefile: 5
file content (29 lines) | stat: -rw-r--r-- 1,169 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Author: Nicholas Bamber <nicholas@periapt.co.uk>
Subject: Stop tests from overwriting source
 The t/*-generate.t tests generate data in t/generated which is in the
 upstream source. This patch makes the tests use a different directory
 which is cleaned up by dh_clean.
Last-Update: 2010-10-24
Forwared: no
--- a/t/1.0-generate.t
+++ b/t/1.0-generate.t
@@ -19,7 +19,7 @@
   $pub_date     = &POSIX::strftime(DATE_TEMPLATE_PUB,   gmtime);
 }
 
-use constant BASEDIR => File::Spec->catdir('t', 'generated');
+use constant BASEDIR => 'generated';
 use constant RSS_VERSION    => "1.0";
 use constant RSS_SAVEAS     => File::Spec->catfile(BASEDIR, RSS_VERSION."-generated.xml");
 use constant RSS_MOD_PREFIX => "my";
--- a/t/2.0-generate.t
+++ b/t/2.0-generate.t
@@ -16,7 +16,7 @@
 my $pub_date     = &POSIX::strftime( DATE_TEMPLATE_PUB,   gmtime );
 ok( $current_date, "Current date: $current_date" );
 
-use constant BASEDIR => File::Spec->catdir('t', 'generated');
+use constant BASEDIR => 'generated';
 use constant RSS_VERSION    => "2.0";
 use constant RSS_SAVEAS     => File::Spec->catfile(BASEDIR, RSS_VERSION."-generated.xml");
 use constant RSS_MOD_PREFIX => "my";