rollup merge of #23538: aturon/conversion

Conflicts:
	src/librustc_back/rpath.rs
This commit is contained in:
Alex Crichton 2015-03-23 15:09:05 -07:00
commit fd13400627
68 changed files with 665 additions and 195 deletions

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(convert)]
use std::env::*;
use std::path::PathBuf;
@ -16,7 +18,7 @@ fn main() {
let oldhome = var("HOME");
set_var("HOME", "/home/MountainView");
assert!(home_dir() == Some(PathBuf::new("/home/MountainView")));
assert!(home_dir() == Some(PathBuf::from("/home/MountainView")));
remove_var("HOME");
if cfg!(target_os = "android") {
@ -37,14 +39,14 @@ fn main() {
assert!(home_dir().is_some());
set_var("HOME", "/home/MountainView");
assert!(home_dir() == Some(PathBuf::new("/home/MountainView")));
assert!(home_dir() == Some(PathBuf::from("/home/MountainView")));
remove_var("HOME");
set_var("USERPROFILE", "/home/MountainView");
assert!(home_dir() == Some(PathBuf::new("/home/MountainView")));
assert!(home_dir() == Some(PathBuf::from("/home/MountainView")));
set_var("HOME", "/home/MountainView");
set_var("USERPROFILE", "/home/PaloAlto");
assert!(home_dir() == Some(PathBuf::new("/home/MountainView")));
assert!(home_dir() == Some(PathBuf::from("/home/MountainView")));
}