about summary refs log tree commit diff
path: root/src/test/stdtest/tempfile.rs
blob: 7db30fa67a1905ebe389d2d32cc7c266042dc8f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import core::*;

use std;
import option;
import std::fs;
import option::some;
import str;
import std::tempfile;

#[test]
fn mkdtemp() {
    let r = tempfile::mkdtemp("./", "foobar");
    alt r {
        some(p) {
            fs::remove_dir(p);
            assert(str::ends_with(p, "foobar"));
        }
        _ { assert(false); }
    }
}