Fix S_IRUSR/S_IWUSR constants on mac. Closes #726
This commit is contained in:
parent
9b89b0cffd
commit
f157d0b32c
3 changed files with 2 additions and 15 deletions
|
@ -335,8 +335,6 @@ fn dump_output(config: config, testfile: str, out: str, err: str) {
|
||||||
maybe_dump_to_stdout(config, out, err);
|
maybe_dump_to_stdout(config, out, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "win32")]
|
|
||||||
#[cfg(target_os = "linux")]
|
|
||||||
fn dump_output_file(config: config, testfile: str, out: str, extension: str) {
|
fn dump_output_file(config: config, testfile: str, out: str, extension: str) {
|
||||||
let outfile = make_out_name(config, testfile, extension);
|
let outfile = make_out_name(config, testfile, extension);
|
||||||
let writer = result::get(
|
let writer = result::get(
|
||||||
|
@ -344,11 +342,6 @@ fn dump_output_file(config: config, testfile: str, out: str, extension: str) {
|
||||||
writer.write_str(out);
|
writer.write_str(out);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME (726): Can't use file_writer on mac
|
|
||||||
#[cfg(target_os = "macos")]
|
|
||||||
fn dump_output_file(config: config, testfile: str, out: str, extension: str) {
|
|
||||||
}
|
|
||||||
|
|
||||||
fn make_out_name(config: config, testfile: str, extension: str) -> str {
|
fn make_out_name(config: config, testfile: str, extension: str) -> str {
|
||||||
output_base_name(config, testfile) + "." + extension
|
output_base_name(config, testfile) + "." + extension
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,8 +42,8 @@ mod libc_constants {
|
||||||
const O_TEXT: int = 0; // nonexistent in darwin libc
|
const O_TEXT: int = 0; // nonexistent in darwin libc
|
||||||
const O_BINARY: int = 0; // nonexistent in darwin libc
|
const O_BINARY: int = 0; // nonexistent in darwin libc
|
||||||
|
|
||||||
const S_IRUSR: uint = 1024u;
|
const S_IRUSR: uint = 256u;
|
||||||
const S_IWUSR: uint = 512u;
|
const S_IWUSR: uint = 128u;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME turn into constants
|
// FIXME turn into constants
|
||||||
|
|
|
@ -4,9 +4,7 @@ import std::io;
|
||||||
import std::str;
|
import std::str;
|
||||||
import std::result;
|
import std::result;
|
||||||
|
|
||||||
// FIXME (726)
|
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore(cfg(target_os = "macos"))]
|
|
||||||
fn test_simple() {
|
fn test_simple() {
|
||||||
let tmpfile: str = "test/run-pass/lib-io-test-simple.tmp";
|
let tmpfile: str = "test/run-pass/lib-io-test-simple.tmp";
|
||||||
log tmpfile;
|
log tmpfile;
|
||||||
|
@ -34,8 +32,6 @@ fn file_reader_not_exist() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
// FIXME (726)
|
|
||||||
#[ignore(cfg(target_os = "macos"))]
|
|
||||||
fn file_buf_writer_bad_name() {
|
fn file_buf_writer_bad_name() {
|
||||||
alt io::file_buf_writer("?/?", []) {
|
alt io::file_buf_writer("?/?", []) {
|
||||||
result::err(e) {
|
result::err(e) {
|
||||||
|
@ -46,8 +42,6 @@ fn file_buf_writer_bad_name() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
// FIXME (726)
|
|
||||||
#[ignore(cfg(target_os = "macos"))]
|
|
||||||
fn buffered_file_buf_writer_bad_name() {
|
fn buffered_file_buf_writer_bad_name() {
|
||||||
alt io::buffered_file_buf_writer("?/?") {
|
alt io::buffered_file_buf_writer("?/?") {
|
||||||
result::err(e) {
|
result::err(e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue