summaryrefslogtreecommitdiffstats
path: root/tests/t-db/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:40:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:40:31 +0000
commitb86570f63e533abcbcb97c2572e0e5732a96307b (patch)
treecabc83be691530ae685c45a8bc7620ccc0e1ebdf /tests/t-db/Makefile
parentInitial commit. (diff)
downloaddpkg-b86570f63e533abcbcb97c2572e0e5732a96307b.tar.xz
dpkg-b86570f63e533abcbcb97c2572e0e5732a96307b.zip
Adding upstream version 1.20.13.upstream/1.20.13upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/t-db/Makefile')
-rw-r--r--tests/t-db/Makefile60
1 files changed, 60 insertions, 0 deletions
diff --git a/tests/t-db/Makefile b/tests/t-db/Makefile
new file mode 100644
index 0000000..2e5b621
--- /dev/null
+++ b/tests/t-db/Makefile
@@ -0,0 +1,60 @@
+# Copyright © 2012 Guillem Jover <guillem@debian.org>
+
+TESTS_DEB :=
+
+include ../Test.mk
+
+PKG_TUPLE = LC_ALL=C $(DPKG_QUERY) -f '$${Package}:$${Architecture}:$${Version}' -W
+
+TEST_CASES += test-field-blank-lines
+TEST_CASES += test-field-blank-lines-update
+TEST_CASES += test-dupe-multi
+TEST_CASES += test-cross-single-update
+TEST_CASES += test-cross-multi-update
+TEST_CASES += test-bogus-single
+TEST_CASES += test-bogus-dupe-same-single
+TEST_CASES += test-bogus-dupe-diff-single
+TEST_CASES += test-bogus-multi
+TEST_CASES += test-bogus-multi-update
+
+test-case: $(TEST_CASES)
+
+test-field-blank-lines: override DPKG_ADMINDIR = db-field-blank-lines
+test-field-blank-lines:
+ $(call stderr_has,$(PKG_TUPLE),warning)
+
+test-field-blank-lines-update: override DPKG_ADMINDIR = db-field-blank-lines-update
+test-field-blank-lines-update:
+ $(call stderr_has,$(PKG_TUPLE),warning)
+
+test-dupe-multi: override DPKG_ADMINDIR = db-dupe-multi
+test-dupe-multi:
+ $(call stdout_is,$(PKG_TUPLE),pkg-multi:amd64:1.0)
+
+test-cross-single-update: override DPKG_ADMINDIR = db-cross-single-update
+test-cross-single-update:
+ $(call stdout_is,$(PKG_TUPLE),pkg-single:armel:3.0)
+
+test-cross-multi-update: override DPKG_ADMINDIR = db-cross-multi-update
+test-cross-multi-update:
+ $(call stdout_is,$(PKG_TUPLE),pkg-multi:armel:4.0)
+
+test-bogus-dupe-same-single: override DPKG_ADMINDIR = db-bogus-dupe-same-single
+test-bogus-dupe-same-single:
+ $(call stderr_has,$(PKG_TUPLE),error)
+
+test-bogus-dupe-diff-single: override DPKG_ADMINDIR = db-bogus-dupe-diff-single
+test-bogus-dupe-diff-single:
+ $(call stderr_has,$(PKG_TUPLE),error)
+
+test-bogus-single: override DPKG_ADMINDIR = db-bogus-single
+test-bogus-single:
+ $(call stderr_has,$(PKG_TUPLE),error)
+
+test-bogus-multi: override DPKG_ADMINDIR = db-bogus-multi
+test-bogus-multi:
+ $(call stderr_has,$(PKG_TUPLE),error)
+
+test-bogus-multi-update: override DPKG_ADMINDIR = db-bogus-multi-update
+test-bogus-multi-update:
+ $(call stderr_has,$(PKG_TUPLE),error)