pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/url2pkg/files pkgtools/url2pkg: move chdir in...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d6adf1791cf8
branches:  trunk
changeset: 399896:d6adf1791cf8
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Aug 18 13:59:38 2019 +0000

description:
pkgtools/url2pkg: move chdir into the main test function

diffstat:

 pkgtools/url2pkg/files/url2pkg.t |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r bcf2dc873073 -r d6adf1791cf8 pkgtools/url2pkg/files/url2pkg.t
--- a/pkgtools/url2pkg/files/url2pkg.t  Sun Aug 18 13:49:13 2019 +0000
+++ b/pkgtools/url2pkg/files/url2pkg.t  Sun Aug 18 13:59:38 2019 +0000
@@ -1,5 +1,5 @@
 # -*- perl -*-
-# $NetBSD: url2pkg.t,v 1.2 2019/08/18 13:50:32 rillig Exp $
+# $NetBSD: url2pkg.t,v 1.3 2019/08/18 13:59:38 rillig Exp $
 
 require "url2pkg.pl";
 
@@ -85,8 +85,6 @@
 
 sub test_generate_initial_package_Makefile_lines__GitHub() {
        my $url = "https://github.com/org/proj/archive/v1.0.0.tar.gz";;
-       my $pkgsrcdir = $ENV{"PKGSRCDIR"} or die;
-       chdir("$pkgsrcdir/pkgtools/url2pkg") or die;
 
        my @lines = generate_initial_package_Makefile_lines($url);
 
@@ -110,6 +108,9 @@
 }
 
 sub test_all() {
+       my $pkgsrcdir = $ENV{"PKGSRCDIR"} or die;
+       chdir("$pkgsrcdir/pkgtools/url2pkg") or die;
+
        test_add_section__simple();
        test_add_section__alignment();
        test_add_section__operators();



Home | Main Index | Thread Index | Old Index