summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-04-02 04:42:46 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-04-02 04:55:54 (EDT)
commite204e64f7cd1113fcb24c25016ae1bfe82f2df7b (patch)
tree3647f817e5ab2457e37c6637ae48355387cb479a /tests
parente37dd9295e0d1c842f33a0502d2af0612015543f (diff)
Add test binary package with hyphenated name
And update tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/aux/common.sh4
-rw-r--r--tests/data/pkg/baz-qux.pkg/control7
-rwxr-xr-xtests/data/pkg/build1
-rwxr-xr-xtests/exe/ob-buildopk.sh3
-rwxr-xr-xtests/exe/ob-genchanges.sh5
-rwxr-xr-xtests/exe/ob-gencontrol.sh18
6 files changed, 33 insertions, 5 deletions
diff --git a/tests/aux/common.sh b/tests/aux/common.sh
index 13e0737..2da887e 100644
--- a/tests/aux/common.sh
+++ b/tests/aux/common.sh
@@ -86,8 +86,8 @@ export OPK_SOURCE='foo'
export OPK_SOURCE_VERSION='1.0-1'
export OPK_SOURCE_VERSION_UPSTREAM='1.0'
export OPK_BINARY_VERSION='1.0-1'
-export OPK_PACKAGES='foo bar'
-export OPK_PACKAGES_REDUCED='foo bar'
+export OPK_PACKAGES='foo baz-qux bar'
+export OPK_PACKAGES_REDUCED='foo baz-qux bar'
# Section 7.3.2 Build and Host System Variables
# OPK_BUILD_ARCH_GNU and OPK_HOST_ARCH_GNU aren't set or used by opkbuild
# utilities. These should be removed from the SPF.
diff --git a/tests/data/pkg/baz-qux.pkg/control b/tests/data/pkg/baz-qux.pkg/control
new file mode 100644
index 0000000..904541e
--- /dev/null
+++ b/tests/data/pkg/baz-qux.pkg/control
@@ -0,0 +1,7 @@
+Architecture: all
+Platform: all
+Depends: ${Generated-Depends}
+Description: Hyphenate all the things
+ ${Common-Description}
+ .
+ This package's name contains a hyphen. That is all.
diff --git a/tests/data/pkg/build b/tests/data/pkg/build
index f7055f8..dbc550a 100755
--- a/tests/data/pkg/build
+++ b/tests/data/pkg/build
@@ -5,3 +5,4 @@ build:
install: build
install -p -m 755 -D src/src/foo.sh foo.data/usr/bin/foo.sh
printf 'Generated-Depends: bar\n' >foo.substvars
+ printf 'Generated-Depends: bar\n' >baz-qux.substvars
diff --git a/tests/exe/ob-buildopk.sh b/tests/exe/ob-buildopk.sh
index bfcc103..1797559 100755
--- a/tests/exe/ob-buildopk.sh
+++ b/tests/exe/ob-buildopk.sh
@@ -42,7 +42,8 @@ ls_inner()
plan_ 9
rm -Rf *'.data/' *'.control/'
-mkdir -p 'foo.data/usr/bin/' 'bar.data/' 'foo.control/' 'bar.control/'
+mkdir -p 'foo.data/usr/bin/' 'bar.data/' 'foo.control/' 'bar.control/' \
+ 'baz-qux.data/' 'baz-qux.control/'
cp -p '../../src/src/foo.sh' 'foo.data/usr/bin/'
touch 'foo.control/control' 'foo.control/md5sums' \
'bar.control/control' 'bar.control/md5sums'
diff --git a/tests/exe/ob-genchanges.sh b/tests/exe/ob-genchanges.sh
index 4f5c371..4b20ad9 100755
--- a/tests/exe/ob-genchanges.sh
+++ b/tests/exe/ob-genchanges.sh
@@ -26,12 +26,13 @@ plan_ 2
>'../../foo_1.0-1_i686-linux-glibc_all.opk'
>'../../bar_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 foo
+ Binary: bar baz-qux foo
Version: 1.0-1
Architecture: i686-linux-glibc
Platform: x60
@@ -41,11 +42,13 @@ cmd_is 'changes file' cat '../../foo_1.0-1_i686-linux-glibc_x60.changes' <<-EOF
Date: Thu, 01 Jan 1970 00:00:00 +0000
Description:
bar - Bit-bang All Registers
+ baz-qux - Hyphenate all the things
foo - Frobnicator of Objects
Changes:
foo (1.0-1) trunk
* Initial release.
Files:
0 base foo_1.0-1_i686-linux-glibc_all.opk
+ 0 base baz-qux_1.0-1_all_all.opk
0 base bar_1.0-1_all_all.opk
EOF
diff --git a/tests/exe/ob-gencontrol.sh b/tests/exe/ob-gencontrol.sh
index 554e53e..f64d512 100755
--- a/tests/exe/ob-gencontrol.sh
+++ b/tests/exe/ob-gencontrol.sh
@@ -22,7 +22,7 @@ set -eu
. "${TOP_SRCDIR}/tests/aux/tap-functions.sh"
. "${TOP_SRCDIR}/tests/aux/common.sh"
-plan_ 8
+plan_ 10
rm -Rf 'src/' *'.data/'
cp -Rp '../../src/' 'src/'
@@ -64,4 +64,20 @@ 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
+ Package: baz-qux
+ Source: foo
+ Version: 1.0-1
+ Architecture: all
+ Platform: all
+ Maintainer: "J. Random Hacker" <jrandom@example.com>
+ Depends: bar
+ Installed-Size: 0
+ Description: Hyphenate all the things
+ This is a frobnicator of objects. Conveniently, it also $(: \
+ )bit-bangs all
+ registers.
+ .
+ This package's name contains a hyphen. That is all.
+ EOF
done