diff options
| author | Jason Molenda <jmolenda@apple.com> | 2015-02-25 02:35:25 +0000 |
|---|---|---|
| committer | Jason Molenda <jmolenda@apple.com> | 2015-02-25 02:35:25 +0000 |
| commit | 671a29d30d2fe5d5d3bab0123690849f98ac031f (patch) | |
| tree | 4e3e98115cb76407a9421169928b4c7a124dab7e /lldb/test/functionalities/paths/TestPaths.py | |
| parent | b20cd673ff1e60cf48ef5e7a54887a360786efff (diff) | |
| download | bcm5719-llvm-671a29d30d2fe5d5d3bab0123690849f98ac031f.tar.gz bcm5719-llvm-671a29d30d2fe5d5d3bab0123690849f98ac031f.zip | |
When FileSpec::Resolve is given a bare file like "ls",
and llvm::sys::fs::make_absolute prepends the current
working directory to that path, leave the original
bare file name unchanged if $cwd/ls doesn't exist.
http://reviews.llvm.org/D7477
<rdar://problem/18775190>
llvm-svn: 230451
Diffstat (limited to 'lldb/test/functionalities/paths/TestPaths.py')
| -rw-r--r-- | lldb/test/functionalities/paths/TestPaths.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/test/functionalities/paths/TestPaths.py b/lldb/test/functionalities/paths/TestPaths.py index c4bafa0ac6c..a211145d57f 100644 --- a/lldb/test/functionalities/paths/TestPaths.py +++ b/lldb/test/functionalities/paths/TestPaths.py @@ -28,6 +28,12 @@ class TestPaths(TestBase): # No directory path types should have the filename set self.assertTrue (f.GetFilename() == None); + def test_filespec_resolve_doesnt_prepend_cwd_if_file_doesnt_exist (self): + file_only = lldb.SBFileSpec("VeryUnlikelToExistInTheCurrentWorkingDirectory", True) + # SBFileSpec(path, True) should not prepend the current-working-directory to the + # file path if it doesn't exist in the current directory. + self.assertTrue (file_only.GetDirectory() == None) + @unittest2.skipUnless(sys.platform.startswith("win32"), "Test for windows only") def test_windows_double_slash (self): '''Test to check the path with double slash is handled correctly ''' |

