diff options
Diffstat (limited to 'tests/exe/ob-gencontrol.sh')
-rwxr-xr-x | tests/exe/ob-gencontrol.sh | 51 |
1 files changed, 39 insertions, 12 deletions
diff --git a/tests/exe/ob-gencontrol.sh b/tests/exe/ob-gencontrol.sh index a619856..309e28a 100755 --- a/tests/exe/ob-gencontrol.sh +++ b/tests/exe/ob-gencontrol.sh @@ -22,20 +22,22 @@ set -eu . "${TOP_SRCDIR}/tests/aux/tap-functions.sh" . "${TOP_SRCDIR}/tests/aux/common.sh" -plan_ 12 +plan_ 14 OB_DO_SOURCE='true' command_ok_ 'ob-gencontrol source package exit status' -- \ ob-gencontrol -cmd_is 'source package control file' cat 'src-foo.control/control' <<-EOF - Package: src-foo +cmd_is 'source package control file' cat 'src:foo.control/control' <<-EOF + Package: src:foo Source: foo - Binary: bar baz-qux foo + Binary: bar baz+qux baz-qux foo Version: 1.0-1 Architecture: src Platform: all Maintainer: "J. Random Hacker" <jrandom@example.com> - Build-Depends: build-all-runes + Build-Depends: build-all-runes, quiet-untuned-xylophone, $(: \ + )something-completely-different Installed-Size: 0 + Format: 2.0 Description: foo source package EOF @@ -45,12 +47,13 @@ cp -Rp '../../src/' 'src/' for run in 'first' 'second'; do command_ok_ "ob-gencontrol ${run} run exit status" -- ob-gencontrol - cmd_is 'control file' cat 'foo.control/control' <<-EOF - Package: foo + cmd_is "${run} run foo control file" cat 'foo.control/control' <<-EOF + Package: foo:i686-linux-glibc Source: foo Version: 1.0-1 Architecture: i686-linux-glibc Platform: all + Section: lib Maintainer: "J. Random Hacker" <jrandom@example.com> Depends: bar Installed-Size: 1 @@ -61,16 +64,18 @@ for run in 'first' 'second'; do . This package provides a frobnicator of objects. EOF - cmd_is 'md5sums file' cat 'foo.control/md5sums' <<-EOF + cmd_is "${run} run foo md5sums file" cat 'foo.control/md5sums' <<-EOF 582b7bd410b9e196dfb0a706ac95bf23 /usr/bin/foo.sh EOF - cmd_is 'control file' cat 'bar.control/control' <<-EOF + cmd_is "${run} run bar control file" cat 'bar.control/control' <<-EOF Package: bar Source: foo Version: 1.0-1 - Architecture: all + Architecture: i686-linux-glibc Platform: all + Section: util Maintainer: "J. Random Hacker" <jrandom@example.com> + Depends: foo:i686-linux-glibc (= 1.0-1) Installed-Size: 0 Description: Bit-bang All Registers This is a frobnicator of objects. Conveniently, it also $(: \ @@ -79,14 +84,36 @@ for run in 'first' 'second'; do . This package assists in bit-banging all yer registers. EOF - cmd_is 'control file' cat 'baz-qux.control/control' <<-EOF + cmd_is "${run} run baz+qux control file" cat 'baz+qux.control/control' \ + <<-EOF + Package: baz+qux + Source: foo + Version: 1.0-1 + Architecture: all + Platform: all + Maintainer: "J. Random Hacker" <jrandom@example.com> + Depends: foo:i686-linux-glibc (>= 1.0-1), $(: \ + )foo:i686-linux-glibc (<< 1.0-1.~), bar + Installed-Size: 0 + Description: Add all the things + This is a frobnicator of objects. Conveniently, it also $(: \ + )bit-bangs all + registers. + . + This package's name contains a plus sign, not to be $(: \ + )confused with the one that + instead contains a hyphen. + EOF + cmd_is "${run} baz-qux foo control file" cat 'baz-qux.control/control' \ + <<-EOF Package: baz-qux Source: foo Version: 1.0-1 Architecture: all Platform: all Maintainer: "J. Random Hacker" <jrandom@example.com> - Depends: bar + Depends: foo:i686-linux-glibc (>= 1.0-1), $(: \ + )foo:i686-linux-glibc (<< 1.0-1.~), bar Installed-Size: 0 Description: Hyphenate all the things This is a frobnicator of objects. Conveniently, it also $(: \ |