Skip to content

Commit

Permalink
test: Rename deb-content test cases to make them more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemj committed May 5, 2020
1 parent 4aed98d commit 02ea226
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions debian/changelog
Expand Up @@ -46,6 +46,8 @@ dpkg (1.20.1) UNRELEASED; urgency=medium
* Packaging:
- Switch to debhelper compatibility level 13.
- Remove debian/tmp prefix from manpages debhelper fragment files.
* Test suite:
- Rename deb-content test cases to make them more descriptive.

[ Updated scripts translations ]
* German (Helge Kreutzmann).
Expand Down
18 changes: 9 additions & 9 deletions t-func/deb-content.at
Expand Up @@ -3,29 +3,29 @@ AT_TESTED([dpkg-deb])
AT_SETUP([dpkg-deb .deb conffiles])
AT_KEYWORDS([dpkg-deb deb conffiles])

DPKG_GEN_CONTROL([pkg-conff-dupe])
DPKG_GEN_FILE([pkg-conff-dupe], [conffiles], [/test-conffile-1
DPKG_GEN_CONTROL([pkg-conff-duped])
DPKG_GEN_FILE([pkg-conff-duped], [conffiles], [/test-conffile-1
/test-conffile-2
/test-conffile-1])
AT_DATA([pkg-conff-dupe/test-conffile-1], [test init
AT_DATA([pkg-conff-duped/test-conffile-1], [test init
])
AT_DATA([pkg-conff-dupe/test-conffile-2], [test init
AT_DATA([pkg-conff-duped/test-conffile-2], [test init
])
AT_CHECK([
# Duplicate conffile entries should produce a warning.
dpkg-deb -b pkg-conff-dupe
dpkg-deb -b pkg-conff-duped
], [0], [ignore], [dpkg-deb: warning: conffile name '/test-conffile-1' is duplicated
dpkg-deb: warning: ignoring 1 warning about the control file(s)
])

DPKG_GEN_CONTROL([pkg-conff-noel])
printf "/test-conffile-1" >"pkg-conff-noel/DEBIAN/conffiles"
AT_DATA([pkg-conff-noel/test-conffile-1], [test init
DPKG_GEN_CONTROL([pkg-conff-noeol])
printf "/test-conffile-1" >"pkg-conff-noeol/DEBIAN/conffiles"
AT_DATA([pkg-conff-noeol/test-conffile-1], [test init
])
AT_CHECK([
# Conffiles need a final newline to guarantee there's been no accidental
# file truncation.
dpkg-deb -b pkg-conff-noel pkg-conff-noel.deb
dpkg-deb -b pkg-conff-noeol pkg-conff-noeol.deb
], [2], [ignore], [dpkg-deb: error: conffile name '/test-conffile-1' is too long, or missing final newline
])

Expand Down

0 comments on commit 02ea226

Please sign in to comment.