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); } } }