Get rid of more deprecated strs on non 64-bit linux platforms.
This commit is contained in:
parent
08a4440d64
commit
b1dafe49af
2 changed files with 16 additions and 16 deletions
|
|
@ -554,7 +554,7 @@ fn list_dir(p: path) -> ~[~str] {
|
|||
fn star(p: ~str) -> ~str { p }
|
||||
|
||||
#[cfg(windows)]
|
||||
fn star(p: str) -> ~str {
|
||||
fn star(p: ~str) -> ~str {
|
||||
let pl = str::len(p);
|
||||
if pl == 0u || (p[pl - 1u] as char != path::consts::path_sep
|
||||
|| p[pl - 1u] as char != path::consts::alt_path_sep) {
|
||||
|
|
|
|||
|
|
@ -314,32 +314,32 @@ mod test {
|
|||
#[test]
|
||||
#[cfg(target_os = "linux")]
|
||||
fn test_rpath_relative() {
|
||||
let o = session::os_linux;
|
||||
check not_win32(o);
|
||||
let res = get_rpath_relative_to_output(o,
|
||||
let o = session::os_linux;
|
||||
check not_win32(o);
|
||||
let res = get_rpath_relative_to_output(o,
|
||||
~"/usr", ~"bin/rustc", ~"lib/libstd.so");
|
||||
assert res == ~"$ORIGIN/../lib";
|
||||
assert res == ~"$ORIGIN/../lib";
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(target_os = "freebsd")]
|
||||
fn test_rpath_relative() {
|
||||
let o = session::os_freebsd;
|
||||
check not_win32(o);
|
||||
let res = get_rpath_relative_to_output(o,
|
||||
"/usr", "bin/rustc", "lib/libstd.so");
|
||||
assert res == "$ORIGIN/../lib";
|
||||
let o = session::os_freebsd;
|
||||
check not_win32(o);
|
||||
let res = get_rpath_relative_to_output(o,
|
||||
~"/usr", ~"bin/rustc", ~"lib/libstd.so");
|
||||
assert res == ~"$ORIGIN/../lib";
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(target_os = "macos")]
|
||||
fn test_rpath_relative() {
|
||||
// this is why refinements would be nice
|
||||
let o = session::os_macos;
|
||||
check not_win32(o);
|
||||
let res = get_rpath_relative_to_output(o, "/usr", "bin/rustc",
|
||||
"lib/libstd.so");
|
||||
assert res == "@executable_path/../lib";
|
||||
// this is why refinements would be nice
|
||||
let o = session::os_macos;
|
||||
check not_win32(o);
|
||||
let res = get_rpath_relative_to_output(o, ~"/usr", ~"bin/rustc",
|
||||
~"lib/libstd.so");
|
||||
assert res == ~"@executable_path/../lib";
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue