//===-- RealpathPrefixesTest.cpp //--------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "gtest/gtest.h" #include "MockSymlinkFileSystem.h" #include "lldb/Utility/FileSpecList.h" #include "lldb/Utility/RealpathPrefixes.h" usingnamespacelldb_private; static FileSpec PosixSpec(llvm::StringRef path) { … } static FileSpec WindowsSpec(llvm::StringRef path) { … } // Should resolve a symlink which match an absolute prefix TEST(RealpathPrefixesTest, MatchingAbsolutePrefix) { … } // Should resolve a symlink which match a relative prefix TEST(RealpathPrefixesTest, MatchingRelativePrefix) { … } // Should resolve in Windows and/or with a case-insensitive support file TEST(RealpathPrefixesTest, WindowsAndCaseInsensitive) { … } // Should resolve a symlink when there is mixture of matching and mismatching // prefixex TEST(RealpathPrefixesTest, MatchingAndMismatchingPrefix) { … } // Should resolve a symlink when the prefixes matches after normalization TEST(RealpathPrefixesTest, ComplexPrefixes) { … } // Should not resolve a symlink which doesn't match any prefixes TEST(RealpathPrefixesTest, MismatchingPrefixes) { … } // Should not resolve a realpath TEST(RealpathPrefixesTest, Realpath) { … }