summaryrefslogtreecommitdiff
path: root/t-func/local.at
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-07-16 17:12:43 +0200
committerGuillem Jover <guillem@debian.org>2016-10-30 04:45:32 +0100
commit57b2ce9c2db08c74eeba0872740da1be09ce6874 (patch)
tree1aa1d18960f6ca9a8dc8046e06e7f9c3054f541e /t-func/local.at
parenta54a3c7e86e2f7b568d4aa162586d46ab4ed7105 (diff)
downloaddpkg-57b2ce9c2db08c74eeba0872740da1be09ce6874.tar.gz
test: Add an initial functional test suite for dpkg-deb and dpkg-split
Move various easy tests from the dpkg-tests repository, so that we can test whether the infrastructure is viable.
Diffstat (limited to 't-func/local.at')
-rw-r--r--t-func/local.at32
1 files changed, 32 insertions, 0 deletions
diff --git a/t-func/local.at b/t-func/local.at
new file mode 100644
index 000000000..3a221c18d
--- /dev/null
+++ b/t-func/local.at
@@ -0,0 +1,32 @@
+# Dpkg helper macros
+
+m4_pattern_forbid([^DPKG_])
+
+# DPKG_GEN_CONTROL([$pkgname])
+m4_define([DPKG_GEN_CONTROL], [
+ mkdir -p '$1/DEBIAN'
+
+ cat >'$1/DEBIAN/control' <<CTRL_TEMPL
+Package: $1
+Version: 0.0-1
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Description: test package
+CTRL_TEMPL
+])
+
+# DPKG_MOD_CONTROL([$pkgname], [$sedexpr])
+m4_define([DPKG_MOD_CONTROL], [
+ sed -i -e '$2' '$1/DEBIAN/control'
+])
+
+# DPKG_GEN_FILE([$pkgname], [$file], [$contents])
+m4_define([DPKG_GEN_FILE], [
+ mkdir -p '$1/DEBIAN'
+
+ cat >'$1/DEBIAN/$2' <<CTRL_TEMPL
+$3
+CTRL_TEMPL
+])