summaryrefslogtreecommitdiffstats
path: root/tests/exe/ob-genchanges.sh
blob: 7fc8ec8ff248c5b9a5383b53185b65de60a5faa0 (plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Tests for ob-genchanges
#
# Copyright (C) 2019 Patrick McDermott
#
# This file is part of opkbuild.
#
# opkbuild is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# opkbuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with opkbuild.  If not, see <http://www.gnu.org/licenses/>.

set -eu

. "${TOP_SRCDIR}/tests/aux/tap-functions.sh"
. "${TOP_SRCDIR}/tests/aux/common.sh"

plan_ 2

>'../../foo:i686-linux-glibc_1.0-1_i686-linux-glibc_all.opk'
>'../../bar_1.0-1_i686-linux-glibc_all.opk'
>'../../baz+qux_1.0-1_all_all.opk'
>'../../baz-qux_1.0-1_all_all.opk'

command_ok_ 'ob-genchanges exit status' -- ob-genchanges
cmd_is 'changes file' cat '../../foo_1.0-1_i686-linux-glibc_x60.changes' <<-EOF
	Format: 1.0
	Source: foo
	Binary: bar baz+qux baz-qux foo
	Version: 1.0-1
	Architecture: i686-linux-glibc
	Platform: x60
	Distribution: trunk
	Maintainer: "J. Random Hacker" <jrandom@example.com>
	Changed-By: "J. Random Hacker" <jrandom@example.com>
	Date: Thu, 01 Jan 1970 01:00:00 +0000
	Description:
	 bar - Bit-bang All Registers
	 baz+qux - Add all the things
	 baz-qux - Hyphenate all the things
	 foo - Frobnicator of Objects
	Changes:
	 foo (1.0-1) trunk
	   * Initial release.
	Files:
	 0 lib foo:i686-linux-glibc_1.0-1_i686-linux-glibc_all.opk
	 0 base baz+qux_1.0-1_all_all.opk
	 0 base baz-qux_1.0-1_all_all.opk
	 0 util bar_1.0-1_i686-linux-glibc_all.opk
	EOF