aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-07 10:18:36 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-07 10:18:36 +0000
commit647c2d567f50671fa83d69e9154dec27f8101940 (patch)
tree6279a07eaa440c8fa33218c93688d4e997e33d20
parent46059cddf5f65e60a2fc61a09b71582a14aaa5af (diff)
downloadpaludis-647c2d567f50671fa83d69e9154dec27f8101940.tar.gz
paludis-647c2d567f50671fa83d69e9154dec27f8101940.tar.xz
More test cases
-rw-r--r--paludis/util/fs_entry_TEST.cc8
-rwxr-xr-xpaludis/util/fs_entry_TEST_setup.sh1
2 files changed, 8 insertions, 1 deletions
diff --git a/paludis/util/fs_entry_TEST.cc b/paludis/util/fs_entry_TEST.cc
index 746268c..0dc8224 100644
--- a/paludis/util/fs_entry_TEST.cc
+++ b/paludis/util/fs_entry_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2005, 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
* Copyright (c) 2006 Mark Loeser <halcy0n@gentoo.org>
*
* This file is part of the Paludis package manager. Paludis is free software;
@@ -144,6 +144,12 @@ namespace test_cases
TEST_CHECK(! d.is_directory());
TEST_CHECK(! d.is_regular_file());
+ e = FSEntry("fs_entry_TEST_dir/doesnotexist_symlink");
+ TEST_CHECK(d.is_symbolic_link());
+ TEST_CHECK(d.exists());
+ TEST_CHECK(! d.is_directory());
+ TEST_CHECK(! d.is_regular_file());
+
FSEntry f("fs_entry_TEST_dir/symlink_to_dir_a/file_in_a");
TEST_CHECK(f.is_regular_file());
TEST_CHECK(! f.is_symbolic_link());
diff --git a/paludis/util/fs_entry_TEST_setup.sh b/paludis/util/fs_entry_TEST_setup.sh
index 9c44686..26661dd 100755
--- a/paludis/util/fs_entry_TEST_setup.sh
+++ b/paludis/util/fs_entry_TEST_setup.sh
@@ -5,6 +5,7 @@ mkdir fs_entry_TEST_dir || exit 2
cd fs_entry_TEST_dir || exit 3
mkdir dir_a || exit 4
ln -s dir_a symlink_to_dir_a || exit 5
+ln -s doesnotexist doesnotexist_symlink || exit 5
touch dir_a/file_in_a || exit 6
touch all_perms || exit 7