[svn r64259] porting afa's 64232 and 64253 to trunk
--HG-- branch : trunk
This commit is contained in:
		
							parent
							
								
									9ad1efe91d
								
							
						
					
					
						commit
						b3e22554d7
					
				|  | @ -514,6 +514,8 @@ class LocalPath(common.FSPathBase, PlatformMixin): | |||
|         else: | ||||
|             if iswin32: | ||||
|                 paths = py.std.os.environ['Path'].split(';') | ||||
|                 if '' not in paths and '.' not in paths: | ||||
|                     paths.append('.') | ||||
|                 try: | ||||
|                     systemroot = os.environ['SYSTEMROOT'] | ||||
|                 except KeyError: | ||||
|  |  | |||
|  | @ -42,4 +42,15 @@ class TestWINLocalPath: | |||
|         assert t1 == str(self.root) + '\\a_path' | ||||
|         t1 = self.root.join('dir/a_path') | ||||
|         assert t1 == str(self.root) + '\\dir\\a_path' | ||||
|          | ||||
| 
 | ||||
|     def test_sysfind_in_currentdir(self):                                                                          | ||||
|         cmd = py.path.local.sysfind('cmd')                                                                         | ||||
|         root = cmd.new(dirname='', basename='') # c:\ in most installations                                        | ||||
|                                                                                                                    | ||||
|         old = root.chdir()                                                                                         | ||||
|         try:                                                                                                       | ||||
|             x = py.path.local.sysfind(cmd.relto(root))                                                             | ||||
|             assert x.check(file=1)                                                                                 | ||||
|         finally:                                                                                                   | ||||
|              old.chdir()     | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue