Skip to content

Use os::tmpdir instead of hard coded /home/ path in test case #23560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/test/run-pass/issue-20797.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-android
// ignore-windows

// Regression test for #20797.

use std::default::Default;
use std::old_io::IoResult;
use std::old_io::fs;
use std::old_io::fs::PathExtensions;
use std::os;

/// A strategy for acquiring more subpaths to walk.
pub trait Strategy {
Expand Down Expand Up @@ -90,5 +88,5 @@ impl<S: Strategy> Iterator for Subpaths<S> {
}

fn main() {
let mut walker: Subpaths<Recursive> = Subpaths::walk(&Path::new("/home")).unwrap();
let mut walker: Subpaths<Recursive> = Subpaths::walk(&os::tmpdir()).unwrap();
}