summaryrefslogtreecommitdiffstats
path: root/tests/exe
diff options
context:
space:
mode:
Diffstat (limited to 'tests/exe')
-rwxr-xr-xtests/exe/ob-genchanges.sh51
1 files changed, 51 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>.
+
+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" <jrandom@example.com>
+ Changed-By: "J. Random Hacker" <jrandom@example.com>
+ 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