From 576b9069b263fc32aa3d6791c247c5863c9fb28a Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 18 Mar 2019 02:01:00 -0400 Subject: tests/exe/ob-genchanges.sh: New test file --- (limited to 'tests') diff --git a/tests/.gitignore b/tests/.gitignore index c359063..4da92ba 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -3,3 +3,4 @@ /pkg/foo-1.0.orig.tar.gz /pkg/tmp/ /*.opk +/*.changes diff --git a/tests/exe/ob-genchanges.sh b/tests/exe/ob-genchanges.sh new file mode 100755 index 0000000..4f5c371 --- /dev/null +++ b/tests/exe/ob-genchanges.sh @@ -0,0 +1,51 @@ +# 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 . + +set -eu + +. "${TOP_SRCDIR}/tests/aux/tap-functions.sh" +. "${TOP_SRCDIR}/tests/aux/common.sh" + +plan_ 2 + +>'../../foo_1.0-1_i686-linux-glibc_all.opk' +>'../../bar_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 + Version: 1.0-1 + Architecture: i686-linux-glibc + Platform: x60 + Distribution: trunk + Maintainer: "J. Random Hacker" + Changed-By: "J. Random Hacker" + Date: Thu, 01 Jan 1970 00:00:00 +0000 + Description: + bar - Bit-bang All Registers + 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 bar_1.0-1_all_all.opk + EOF diff --git a/tests/local.mk b/tests/local.mk index f425471..1550f97 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -11,7 +11,8 @@ TESTS = \ %reldir%/exe/ob-applypatches.sh \ %reldir%/exe/ob-installdocs.sh \ %reldir%/exe/ob-gencontrol.sh \ - %reldir%/exe/ob-buildopk.sh + %reldir%/exe/ob-buildopk.sh \ + %reldir%/exe/ob-genchanges.sh TEST_EXTENSIONS = .sh SH_LOG_DRIVER = \ AM_TAP_AWK='$(AWK)' \ -- cgit v0.9.1