+test_deb_control() {
+ echo "Package: apt-test-depends"
+ echo "Version: 1.0"
+ echo "Architecture: all"
+ printf "Depends:"
+ (
+ for i in Build-Depends Build-Depends-Indep Build-Depends-Arch; do
+ grep-dctrl -ns $i -S apt ./debian/control && echo ,
+ done
+ grep-dctrl -ns Depends -F Tests run-tests ./debian/tests/control
+ ) | tr '\n' ' '\
+ | sed -r -e 's#<[^,<>()@]*>##g' \
+ -e 's#@[^,<>()@]*@##g' \
+ -e 's#dpkg-dev \([^)]*\)#dpkg-dev#g' \
+ -e 's#debhelper \([^)]*\)#debhelper#g' \
+ -e 's#@##g' \
+ -e 's#,(\s+,)+#, #g' \
+ -e 's#\s+# #g'
+}
+