Skip to content

Commit 3dcfc44

Browse files
committed
Move tempdir to a crates.io dep
Closes #33
1 parent 8e0dc98 commit 3dcfc44

File tree

3 files changed

+6
-23
lines changed

3 files changed

+6
-23
lines changed

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ documentation = "http://doc.rust-lang.org/glob"
1010
description = """
1111
Support for matching file paths against Unix shell style patterns.
1212
"""
13+
14+
[dev-dependencies]
15+
tempdir = "0.3"

tests/glob-std.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@
1010

1111
// ignore-windows TempDir may cause IoError on windows: #10462
1212

13-
#![feature(old_path, old_io, path, fs, io)]
13+
#![feature(path, fs)]
1414

1515
extern crate glob;
16+
extern crate tempdir;
1617

1718
use glob::glob;
1819
use std::env;
1920
use std::path::PathBuf;
2021
use std::fs;
2122
use tempdir::TempDir;
2223

23-
mod tempdir;
24-
2524
#[test]
2625
fn main() {
2726
fn mk_file(path: &str, directory: bool) {
@@ -38,8 +37,7 @@ fn main() {
3837

3938
let root = TempDir::new("glob-tests");
4039
let root = root.ok().expect("Should have created a temp directory");
41-
let old_root = std::old_path::Path::new(root.path().to_str().unwrap());
42-
assert!(env::set_current_dir(&old_root).is_ok());
40+
assert!(env::set_current_dir(root.path()).is_ok());
4341

4442
mk_file("aaa", true);
4543
mk_file("aaa/apple", true);

tests/tempdir/mod.rs

-18
This file was deleted.

0 commit comments

Comments
 (0)