pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/pkgtools/url2pkg/files
Module Name: pkgsrc
Committed By: rillig
Date: Thu Sep 12 02:35:08 UTC 2019
Modified Files:
pkgsrc/pkgtools/url2pkg/files: url2pkg.t
Log Message:
pkgtools/url2pkg: discover test cases automatically
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 pkgsrc/pkgtools/url2pkg/files/url2pkg.t
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/pkgtools/url2pkg/files/url2pkg.t
diff -u pkgsrc/pkgtools/url2pkg/files/url2pkg.t:1.6 pkgsrc/pkgtools/url2pkg/files/url2pkg.t:1.7
--- pkgsrc/pkgtools/url2pkg/files/url2pkg.t:1.6 Sun Aug 18 18:02:48 2019
+++ pkgsrc/pkgtools/url2pkg/files/url2pkg.t Thu Sep 12 02:35:07 2019
@@ -1,5 +1,5 @@
# -*- perl -*-
-# $NetBSD: url2pkg.t,v 1.6 2019/08/18 18:02:48 rillig Exp $
+# $NetBSD: url2pkg.t,v 1.7 2019/09/12 02:35:07 rillig Exp $
require "url2pkg.pl";
@@ -157,22 +157,17 @@ sub test_generate_initial_package_Makefi
]);
}
-sub test_all() {
+sub t_main() {
my $pkgsrcdir = $ENV{"PKGSRCDIR"} or die;
chdir("$pkgsrcdir/pkgtools/url2pkg") or die;
- test_lines_add_vars__simple();
- test_lines_add_vars__alignment();
- test_lines_add_vars__operators();
- test_lines_append__not_found();
- test_lines_append__only_comment();
- test_lines_append__value_with_comment();
- test_lines_append__value_without_comment();
- test_generate_initial_package_Makefile_lines__GitHub_archive();
- test_generate_initial_package_Makefile_lines__GitHub_release_containing_project_name();
- test_generate_initial_package_Makefile_lines__GitHub_release_not_containing_project_name();
+ no strict 'refs';
+ foreach my $testname (sort grep { $_ =~ qr"^test_" } keys %{"main::"}) {
+ my $testfunc = \&{"main::$testname"};
+ $testfunc->() if defined($testfunc);
+ }
done_testing();
}
-test_all();
+t_main();
Home |
Main Index |
Thread Index |
Old Index