]>
git.saurik.com Git - apt.git/blob - test/libapt/sourcelist_test.cc
3 #include <apt-pkg/sourcelist.h>
4 #include <apt-pkg/fileutl.h>
11 #include <gtest/gtest.h>
13 #include "file-helpers.h"
15 class SourceList
: public pkgSourceList
{
17 using pkgSourceList::ParseFileDeb822
;
20 TEST(SourceListTest
,ParseFileDeb822
)
24 createTemporaryFile("parsefiledeb822", fd
, &tempfile
,
26 "URIs: http://ftp.debian.org/debian\n"
29 "Description: short\n"
30 " long description that can be very long\n"
33 "URIs: http://ftp.debian.org/debian\n"
35 "Sections: main non-free\n");
39 EXPECT_EQ(2, sources
.ParseFileDeb822(tempfile
));
40 EXPECT_EQ(2, sources
.size());