]> git.saurik.com Git - apt.git/blobdiff - test/libapt/sourcelist_test.cc
warning: no previous declaration for foobar() [-Wmissing-declarations]
[apt.git] / test / libapt / sourcelist_test.cc
index ae5d11f6602c87039d4657e01eec088663693843..e79b6d65e1659ceb240a5955bd52a39f172005fd 100644 (file)
@@ -9,7 +9,7 @@
 char *tempfile = NULL;
 int tempfile_fd = -1;
 
 char *tempfile = NULL;
 int tempfile_fd = -1;
 
-void remove_tmpfile(void)
+static void remove_tmpfile(void)
 {
    if (tempfile_fd > 0)
       close(tempfile_fd);
 {
    if (tempfile_fd > 0)
       close(tempfile_fd);
@@ -21,21 +21,24 @@ void remove_tmpfile(void)
 
 int main(int argc, char *argv[])
 {
 
 int main(int argc, char *argv[])
 {
+  _config->Set("APT::Sources::Use-Deb822", true);
+
    const char contents[] = ""
    const char contents[] = ""
-      "Type: deb\n"
-      "URI: http://ftp.debian.org/debian\n"
+      "Types: deb\n"
+      "URIs: http://ftp.debian.org/debian\n"
       "Suites: stable\n"
       "Sections: main\n"
       "Suites: stable\n"
       "Sections: main\n"
-      "Comment: Some random string\n"
-      " that can be very long\n"
+      "Description: short\n"
+      " long description that can be very long\n"
       "\n"
       "\n"
-      "Type: deb\n"
-      "URI: http://ftp.debian.org/debian\n"
-      "Suite: 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;
       ;
 
    FileFd fd;
+   atexit(remove_tmpfile);
    tempfile = strdup("apt-test.XXXXXXXX");
    tempfile_fd = mkstemp(tempfile);
 
    tempfile = strdup("apt-test.XXXXXXXX");
    tempfile_fd = mkstemp(tempfile);