summaryrefslogtreecommitdiffstats
path: root/tests/t-db/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:58:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:58:51 +0000
commitcbffab246997fb5a06211dfb706b54e5ae5bb59f (patch)
tree0573c5d96f58d74d76a49c0f2a70398e389a36d3 /tests/t-db/Makefile
parentInitial commit. (diff)
downloaddpkg-cbffab246997fb5a06211dfb706b54e5ae5bb59f.tar.xz
dpkg-cbffab246997fb5a06211dfb706b54e5ae5bb59f.zip
Adding upstream version 1.21.22.upstream/1.21.22upstream
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)