diff options
Diffstat (limited to 't-func/deb-fields.at')
-rw-r--r-- | t-func/deb-fields.at | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t-func/deb-fields.at b/t-func/deb-fields.at new file mode 100644 index 0000000..6de4b92 --- /dev/null +++ b/t-func/deb-fields.at @@ -0,0 +1,21 @@ +AT_TESTED([dpkg-deb]) + +AT_SETUP([dpkg-deb .deb fields]) +AT_KEYWORDS([dpkg-deb deb fields]) + +DPKG_GEN_CONTROL([pkg-package-type-void]) +AT_CHECK([ +dpkg-deb -b pkg-package-type-void +# Test absence of Package-Type field. +test -z "$(dpkg-deb -f pkg-package-type-void.deb Package-Type)" +], [0], [ignore]) + +DPKG_GEN_CONTROL([pkg-package-type-use]) +DPKG_MOD_CONTROL([pkg-package-type-use], [/^Package:/aPackage-Type: udeb]) +AT_CHECK([ +dpkg-deb -b pkg-package-type-use +# Test presence of Package-Type field. +test -n "$(dpkg-deb -f pkg-package-type-use.deb Package-Type)" +], [0], [ignore]) + +AT_CLEANUP |