summaryrefslogtreecommitdiff
path: root/test/test_archive.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_archive.cxx')
-rw-r--r--test/test_archive.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test_archive.cxx b/test/test_archive.cxx
index 655e65f6d..f023da886 100644
--- a/test/test_archive.cxx
+++ b/test/test_archive.cxx
@@ -44,11 +44,13 @@ ArchiveLookupTest::TestArchiveLookup()
archive_lookup(path, &archive, &inpath, &suffix));
free(path);
- path = strdup("Makefile/foo/bar");
+ fclose(fopen("dummy", "w"));
+
+ path = strdup("dummy/foo/bar");
CPPUNIT_ASSERT_EQUAL(true,
archive_lookup(path, &archive, &inpath, &suffix));
CPPUNIT_ASSERT_EQUAL((const char *)path, archive);
- CPPUNIT_ASSERT_EQUAL(0, strcmp(archive, "Makefile"));
+ CPPUNIT_ASSERT_EQUAL(0, strcmp(archive, "dummy"));
CPPUNIT_ASSERT_EQUAL(0, strcmp(inpath, "foo/bar"));
CPPUNIT_ASSERT_EQUAL((const char *)nullptr, suffix);
free(path);