From 76e2632459410dec81337edb6a9fee33c9a660f3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 11:59:37 +0200 Subject: Adding upstream version 2.7.12. Signed-off-by: Daniel Baumann --- test/libapt/sourcelist_test.cc | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 test/libapt/sourcelist_test.cc (limited to 'test/libapt/sourcelist_test.cc') diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc new file mode 100644 index 0000000..f6a1a91 --- /dev/null +++ b/test/libapt/sourcelist_test.cc @@ -0,0 +1,33 @@ +#include + +#include +#include + +#include +#include +#include +#include + +#include + +#include "file-helpers.h" + +TEST(SourceListTest,ParseFileDeb822) +{ + auto const file = createTemporaryFile("parsefiledeb822.XXXXXX.sources", + "Types: deb\n" + "URIs: http://ftp.debian.org/debian\n" + "Suites: stable\n" + "Components: main\n" + "Description: short\n" + " long description that can be very long\n" + "\n" + "Types: deb\n" + "URIs: http://ftp.debian.org/debian\n" + "Suites: unstable\n" + "Components: main non-free\n"); + + pkgSourceList sources; + EXPECT_TRUE(sources.Read(file.Name())); + EXPECT_EQ(2u, sources.size()); +} -- cgit v1.2.3