implement BuildProfileSpec support as dpkg has in 1.17.2
[ntk/apt.git] / test / libapt / sourcelist_test.cc
index 6e83d08..0300ce9 100644 (file)
@@ -21,21 +21,24 @@ void remove_tmpfile(void)
 
 int main(int argc, char *argv[])
 {
+  _config->Set("APT::Sources::Use-Deb822", true);
+
    const char contents[] = ""
-      "Type: deb\n"
-      "URL: http://ftp.debian.org/debian\n"
-      "Dist: stable\n"
-      "Section: main\n"
-      "Comment: Some random string\n"
-      " that can be very long\n"
+      "Types: deb\n"
+      "URIs: http://ftp.debian.org/debian\n"
+      "Suites: stable\n"
+      "Sections: main\n"
+      "Description: short\n"
+      " long description that can be very long\n"
       "\n"
-      "Type: deb\n"
-      "URL: http://ftp.debian.org/debian\n"
-      "Dist: unstable\n"
-      "Section: main non-free\n"
+      "Types: deb\n"
+      "URIs: http://ftp.debian.org/debian\n"
+      "Suites: unstable\n"
+      "Sections: main non-free\n"
       ;
 
    FileFd fd;
+   atexit(remove_tmpfile);
    tempfile = strdup("apt-test.XXXXXXXX");
    tempfile_fd = mkstemp(tempfile);