comparison tests/ports.t @ 770:56ab5c012d5f

fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree". fports is supposed to be the successor to check-ports.
author Franz Glasner <fzglas.hg@dom66.de>
date Wed, 23 Oct 2024 13:56:52 +0200
parents
children 1ffb4e15151d
comparison
equal deleted inserted replaced
769:03350d2a2af6 770:56ab5c012d5f
1 Basic tests of ports.subr
2
3 Shell is /bin/sh
4
5
6 Setup
7 =====
8
9 We need common.subr and ports.subr
10
11 $ set -u
12 $ . "${TESTDIR}/testsetup.sh"
13 $ _p_datadir="${TESTDIR}/../share/local-bsdtools"
14 $ . "${_p_datadir}/farray.sh"
15 $ . "${_p_datadir}/common.subr"
16 $ . "${_p_datadir}/ports.subr"
17
18
19 Package Mapping
20 ===============
21
22 init_package_mapping
23 --------------------
24
25 $ init_package_mapping PMAPPING
26
27
28 get_package_mapping
29 -------------------
30
31 An empty database errors fatally
32
33 $ (get_package_mapping '' whatever-package)
34 ERROR: missing falist name or token value
35 [70]
36
37 Empty package name errors fatally
38
39 $ (get_package_mapping PMAPPING)
40 /bin/sh: ERROR: missing package name
41 [64]
42
43 $ get_package_mapping PMAPPING install-package
44 parent-package (no-eol)
45
46 This is the target of the mapping
47
48 $ get_package_mapping PMAPPING parent-package
49 [1]
50
51 Another package
52
53 $ get_package_mapping PMAPPING install-package-v2
54 parent-package-v2 (no-eol)
55
56 Commented out
57
58 $ get_package_mapping PMAPPING install-package-v3
59 [1]
60
61
62 Repositories
63 ============
64
65 Assume that FreeBSD is always configured and enabled
66
67 $ get_configured_pkg_repository_names | grep -F FreeBSD
68 FreeBSD
69
70
71 # Runtime much too long: need another strategy
72 # $ REPODB=''
73 # $ init_repositories REPODB