diff options
| author | Greg Clayton <gclayton@apple.com> | 2014-08-25 18:30:00 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2014-08-25 18:30:00 +0000 |
| commit | 21405a86d91b7b2f98712789c7d6cb8fc5533b80 (patch) | |
| tree | 8d27dde0cb96adb7ec46d20831c8fb53af12fc4f | |
| parent | 0d8400c89c1a9f0c1ca76c83f2e59deb4708e8ea (diff) | |
| download | bcm5719-llvm-21405a86d91b7b2f98712789c7d6cb8fc5533b80.tar.gz bcm5719-llvm-21405a86d91b7b2f98712789c7d6cb8fc5533b80.zip | |
Added a test case to ensure lldb::SBHostOS::GetLLDBPath() doesn't return lldb::SBFileSpec objects with the filename filled in for directory paths.
llvm-svn: 216399
| -rw-r--r-- | lldb/test/functionalities/paths/TestPaths.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lldb/test/functionalities/paths/TestPaths.py b/lldb/test/functionalities/paths/TestPaths.py new file mode 100644 index 00000000000..5bea01a8296 --- /dev/null +++ b/lldb/test/functionalities/paths/TestPaths.py @@ -0,0 +1,37 @@ +""" +Test some lldb command abbreviations. +""" +import commands +import lldb +import os +import time +import unittest2 +from lldbtest import * +import lldbutil + +class TestPaths(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + def test_paths (self): + '''Test to make sure no file names are set in the lldb.SBFileSpec objects returned by lldb.SBHostOS.GetLLDBPath() for paths that are directories''' + dir_path_types = [lldb.ePathTypeLLDBShlibDir, + lldb.ePathTypeSupportExecutableDir, + lldb.ePathTypeHeaderDir, + lldb.ePathTypePythonDir, + lldb.ePathTypeLLDBSystemPlugins, + lldb.ePathTypeLLDBUserPlugins, + lldb.ePathTypeLLDBTempSystemDir] + + for path_type in dir_path_types: + f = lldb.SBHostOS.GetLLDBPath(path_type); + # No directory path types should have the filename set + self.assertTrue (f.GetFilename() == None); + + +if __name__ == '__main__': + import atexit + lldb.SBDebugger.Initialize() + atexit.register(lambda: lldb.SBDebugger.Terminate()) + unittest2.main() + |

