Explorar o código

test: Correctly iterate over all default and passed .dsc template substvars

The code was returning all keys and values for %default_substvars,
when instead we should have been requesting all %default_substvars
and %options keys.
Guillem Jover %!s(int64=9) %!d(string=hai) anos
pai
achega
028bfa99a0
Modificáronse 2 ficheiros con 2 adicións e 1 borrados
  1. 1 0
      debian/changelog
  2. 1 1
      scripts/t/dpkg_source.t

+ 1 - 0
debian/changelog

@@ -35,6 +35,7 @@ dpkg (1.18.19) UNRELEASED; urgency=medium
       Prompted by Stuart Prescott <stuart@debian.org>.
   * Test suite:
     - Generate and check all currently possible architecture wildcards.
+    - Correctly iterate over all default and passed .dsc template substvars.
 
   [ Updated programs translations ]
   * German (Sven Joachim).

+ 1 - 1
scripts/t/dpkg_source.t

@@ -89,7 +89,7 @@ sub gen_source
     my (%options) = @_;
 
     my $substvars = Dpkg::Substvars->new();
-    foreach my $var (%default_substvars) {
+    foreach my $var ((keys %default_substvars, keys %options)) {
         my $value = $options{$var} // $default_substvars{$var};
 
         $substvars->set_as_auto($var, $value);