From 068d3b26698139ee92e6767648d2ebace18234b6 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 17 Jun 2023 17:47:10 -0400 Subject: tests: Verify contents of built package --- (limited to 'tests') diff --git a/tests/build.sh b/tests/build.sh index a5032cc..760d9be 100755 --- a/tests/build.sh +++ b/tests/build.sh @@ -20,11 +20,13 @@ set -eu . "${TOP_SRCDIR}/tests/aux/tap-functions.sh" +. "${TOP_SRCDIR}/tests/aux/common.sh" -plan_ 1 +plan_ 2 mkdir -p "${TOP_BUILDDIR}/tests/" +# FIXME: Specify specials override file SOURCE_DATE_EPOCH=1685592000 command_ok_ 'package building' -- \ "${TOP_BUILDDIR}/opkg-opk" \ -b \ @@ -32,4 +34,23 @@ SOURCE_DATE_EPOCH=1685592000 command_ok_ 'package building' -- \ -d "${TOP_SRCDIR}/tests/pkg/data/" \ "${TOP_BUILDDIR}/tests/pkg.opk" +# FIXME: /dev/null should be a char device +cmd_is 'package info' \ + "${TOP_BUILDDIR}/opkg-opk" \ + -f control \ + -L \ + "${TOP_BUILDDIR}/tests/pkg.opk" \ + 0<<-EOF + Package: foo + Source: foo + Version: 1.0 + + drwxr-xr-x pj/pj 0 2023-06-01 00:00:00 / + drwxr-xr-x pj/pj 0 2023-06-01 00:00:00 /bin/ + lrwxrwxrwx pj/pj 0 2023-06-01 00:00:00 /bin/false -> true + -rwxr-xr-x pj/pj 84 2023-06-01 00:00:00 /bin/true + drwxr-xr-x pj/pj 0 2023-06-01 00:00:00 /dev/ + -rw-r--r-- pj/pj 0 2023-06-01 00:00:00 /dev/null + EOF + : -- cgit v0.9.1