summaryrefslogtreecommitdiffstats
path: root/tests/t-conffile-forcenew
diff options
context:
space:
mode:
Diffstat (limited to 'tests/t-conffile-forcenew')
-rw-r--r--tests/t-conffile-forcenew/Makefile17
-rw-r--r--tests/t-conffile-forcenew/mod-conffile1
-rw-r--r--tests/t-conffile-forcenew/pkg-conff-forcenew-0/DEBIAN/conffiles1
-rw-r--r--tests/t-conffile-forcenew/pkg-conff-forcenew-0/DEBIAN/control9
-rw-r--r--tests/t-conffile-forcenew/pkg-conff-forcenew-0/test-conffile1
-rw-r--r--tests/t-conffile-forcenew/pkg-conff-forcenew-1/DEBIAN/conffiles1
-rw-r--r--tests/t-conffile-forcenew/pkg-conff-forcenew-1/DEBIAN/control9
-rw-r--r--tests/t-conffile-forcenew/pkg-conff-forcenew-1/test-conffile1
-rw-r--r--tests/t-conffile-forcenew/ref-conffile1
9 files changed, 41 insertions, 0 deletions
diff --git a/tests/t-conffile-forcenew/Makefile b/tests/t-conffile-forcenew/Makefile
new file mode 100644
index 0000000..c492c6c
--- /dev/null
+++ b/tests/t-conffile-forcenew/Makefile
@@ -0,0 +1,17 @@
+TESTS_DEB := pkg-conff-forcenew-0 pkg-conff-forcenew-1
+
+include ../Test.mk
+
+test-case:
+ $(DPKG_INSTALL) pkg-conff-forcenew-0.deb
+ # Modify the conffile.
+ $(BEROOT) cp mod-conffile "$(DPKG_INSTDIR)/test-conffile"
+ # Test that we do not get the new conffile.
+ $(DPKG_INSTALL) pkg-conff-forcenew-0.deb
+ cmp mod-conffile "$(DPKG_INSTDIR)/test-conffile"
+ # Test that we get the new conffile.
+ $(DPKG_INSTALL) --force-confnew pkg-conff-forcenew-1.deb
+ cmp ref-conffile "$(DPKG_INSTDIR)/test-conffile"
+
+test-clean:
+ $(DPKG_PURGE) pkg-conff-forcenew
diff --git a/tests/t-conffile-forcenew/mod-conffile b/tests/t-conffile-forcenew/mod-conffile
new file mode 100644
index 0000000..73f8903
--- /dev/null
+++ b/tests/t-conffile-forcenew/mod-conffile
@@ -0,0 +1 @@
+test modified
diff --git a/tests/t-conffile-forcenew/pkg-conff-forcenew-0/DEBIAN/conffiles b/tests/t-conffile-forcenew/pkg-conff-forcenew-0/DEBIAN/conffiles
new file mode 100644
index 0000000..4fad7e9
--- /dev/null
+++ b/tests/t-conffile-forcenew/pkg-conff-forcenew-0/DEBIAN/conffiles
@@ -0,0 +1 @@
+/test-conffile
diff --git a/tests/t-conffile-forcenew/pkg-conff-forcenew-0/DEBIAN/control b/tests/t-conffile-forcenew/pkg-conff-forcenew-0/DEBIAN/control
new file mode 100644
index 0000000..02d528e
--- /dev/null
+++ b/tests/t-conffile-forcenew/pkg-conff-forcenew-0/DEBIAN/control
@@ -0,0 +1,9 @@
+Package: pkg-conff-forcenew
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Description: test package - force-confnew behaviour
+ Debbug: 391818
+
diff --git a/tests/t-conffile-forcenew/pkg-conff-forcenew-0/test-conffile b/tests/t-conffile-forcenew/pkg-conff-forcenew-0/test-conffile
new file mode 100644
index 0000000..6fbc8b5
--- /dev/null
+++ b/tests/t-conffile-forcenew/pkg-conff-forcenew-0/test-conffile
@@ -0,0 +1 @@
+test init
diff --git a/tests/t-conffile-forcenew/pkg-conff-forcenew-1/DEBIAN/conffiles b/tests/t-conffile-forcenew/pkg-conff-forcenew-1/DEBIAN/conffiles
new file mode 100644
index 0000000..4fad7e9
--- /dev/null
+++ b/tests/t-conffile-forcenew/pkg-conff-forcenew-1/DEBIAN/conffiles
@@ -0,0 +1 @@
+/test-conffile
diff --git a/tests/t-conffile-forcenew/pkg-conff-forcenew-1/DEBIAN/control b/tests/t-conffile-forcenew/pkg-conff-forcenew-1/DEBIAN/control
new file mode 100644
index 0000000..fcc03d9
--- /dev/null
+++ b/tests/t-conffile-forcenew/pkg-conff-forcenew-1/DEBIAN/control
@@ -0,0 +1,9 @@
+Package: pkg-conff-forcenew
+Version: 1
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Description: test package - force-confnew behaviour
+ Debbug: 391818
+
diff --git a/tests/t-conffile-forcenew/pkg-conff-forcenew-1/test-conffile b/tests/t-conffile-forcenew/pkg-conff-forcenew-1/test-conffile
new file mode 100644
index 0000000..35f4da8
--- /dev/null
+++ b/tests/t-conffile-forcenew/pkg-conff-forcenew-1/test-conffile
@@ -0,0 +1 @@
+test end
diff --git a/tests/t-conffile-forcenew/ref-conffile b/tests/t-conffile-forcenew/ref-conffile
new file mode 100644
index 0000000..35f4da8
--- /dev/null
+++ b/tests/t-conffile-forcenew/ref-conffile
@@ -0,0 +1 @@
+test end