libcore: Fix core test. rs=broken
This commit is contained in:
parent
83675895af
commit
c6fe93d9b5
3 changed files with 84 additions and 76 deletions
|
@ -1233,6 +1233,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn copy_file_ok() {
|
||||
unsafe {
|
||||
let tempdir = getcwd(); // would like to use $TMPDIR,
|
||||
// doesn't seem to work on Linux
|
||||
assert (str::len(tempdir.to_str()) > 0u);
|
||||
|
@ -1263,4 +1264,5 @@ mod tests {
|
|||
assert (remove_file(&in));
|
||||
assert (remove_file(&out));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2674,10 +2674,12 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_to_lower() {
|
||||
unsafe {
|
||||
assert ~"" == map(~"", |c| libc::tolower(c as c_char) as char);
|
||||
assert ~"ymca" == map(~"YMCA",
|
||||
|c| libc::tolower(c as c_char) as char);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_unsafe_slice() {
|
||||
|
@ -3192,10 +3194,12 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_map() {
|
||||
unsafe {
|
||||
assert ~"" == map(~"", |c| libc::toupper(c as c_char) as char);
|
||||
assert ~"YMCA" == map(~"ymca",
|
||||
|c| libc::toupper(c as c_char) as char);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_all() {
|
||||
|
|
|
@ -957,6 +957,7 @@ extern mod testrt {
|
|||
|
||||
#[test]
|
||||
fn test_spawn_sched_blocking() {
|
||||
unsafe {
|
||||
|
||||
// Testing that a task in one scheduler can block in foreign code
|
||||
// without affecting other schedulers
|
||||
|
@ -1011,6 +1012,7 @@ fn test_spawn_sched_blocking() {
|
|||
oldcomm::recv(fin_po);
|
||||
testrt::rust_dbg_lock_destroy(lock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue