diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-02-21 19:07:30 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-02-21 19:07:30 +0000 |
commit | 170245419cea86f1c48bc499d558dae5cd9f397e (patch) | |
tree | 92c0f79031ea8372284d568b1bc00d348c396ff9 | |
parent | 81eb2fedd99ccf2700de4eaad60427cb128fa96f (diff) |
First regression test for pkg_add, checking packages-specs lists.
(the nice thing about having this as perl modules is that we CAN write
regression tests)
-rw-r--r-- | regress/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.sbin/Makefile | 5 | ||||
-rw-r--r-- | regress/usr.sbin/pkg_add/Makefile | 10 | ||||
-rw-r--r-- | regress/usr.sbin/pkg_add/check-name | 11 |
4 files changed, 28 insertions, 2 deletions
diff --git a/regress/Makefile b/regress/Makefile index 51102ab3ebf..883241557f0 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.16 2002/12/04 05:03:02 art Exp $ +# $OpenBSD: Makefile,v 1.17 2004/02/21 19:07:29 espie Exp $ # # To run full regression tests you just need two steps: @@ -15,7 +15,7 @@ # email address, preferably 'regress@openbsd.org'. # To skip the really slow tests, set the REGRESS_SKIP_SLOW variable. -SUBDIR+= etc bin include lib libexec sbin sys share usr.bin misc +SUBDIR+= etc bin include lib libexec sbin sys share usr.bin usr.sbin misc install: diff --git a/regress/usr.sbin/Makefile b/regress/usr.sbin/Makefile new file mode 100644 index 00000000000..662362d6c7d --- /dev/null +++ b/regress/usr.sbin/Makefile @@ -0,0 +1,5 @@ +# $OpenBSD: Makefile,v 1.1 2004/02/21 19:07:29 espie Exp $ + +SUBDIR+= pkg_add + +.include <bsd.subdir.mk> diff --git a/regress/usr.sbin/pkg_add/Makefile b/regress/usr.sbin/pkg_add/Makefile new file mode 100644 index 00000000000..a27c7318a22 --- /dev/null +++ b/regress/usr.sbin/pkg_add/Makefile @@ -0,0 +1,10 @@ +# $OpenBSD: Makefile,v 1.1 2004/02/21 19:07:29 espie Exp $ + +REGRESS_TARGETS=pkgnames + +pkgnames: + perl check-name + +.PHONY: pkgnames + +.include <bsd.regress.mk> diff --git a/regress/usr.sbin/pkg_add/check-name b/regress/usr.sbin/pkg_add/check-name new file mode 100644 index 00000000000..0f9fe003acb --- /dev/null +++ b/regress/usr.sbin/pkg_add/check-name @@ -0,0 +1,11 @@ +#! /usr/bin/perl +# $OpenBSD: check-name,v 1.1 2004/02/21 19:07:29 espie Exp $ +# Written by Marc Espie +# Public domain + +use Test::Simple tests => 1; +use OpenBSD::PackageName; + +my @list=qw(py-MxDateTime-2.0.1-py2.1); + +ok(OpenBSD::PackageName::pkgspec_match('py-MxDateTime->=2.0-py2.1', @list) == 1); |