diff --git a/crates/oyster_runtime/tests/it/builtins/mod.rs b/crates/oyster_runtime/tests/it/builtins/mod.rs index 01ddb86..85a9507 100644 --- a/crates/oyster_runtime/tests/it/builtins/mod.rs +++ b/crates/oyster_runtime/tests/it/builtins/mod.rs @@ -1,6 +1,10 @@ mod math; -use std::{borrow::Cow, ffi::OsStr, io::Write}; +use std::{ + borrow::Cow, + ffi::OsStr, + io::{self, Write}, +}; use expect_test::{expect, Expect}; use oyster_builtin_proc::builtin; @@ -11,8 +15,7 @@ use crate::collect_output; #[builtin(description = "test builtin")] fn test_builtin(_: &mut Shell, _: &[Cow]) { - // XXX: this is a workaround around libtest's use of io::set_output_capture - let _ = write!(std::io::stdout(), "this is a test\n"); + writeln!(io::stdout(), "this is a test").unwrap(); } fn check(ast: &ast::Code, expect: Expect) { diff --git a/crates/oyster_runtime/tests/it/main.rs b/crates/oyster_runtime/tests/it/main.rs index 47e4850..177fe27 100644 --- a/crates/oyster_runtime/tests/it/main.rs +++ b/crates/oyster_runtime/tests/it/main.rs @@ -50,7 +50,7 @@ where let master = unsafe { File::from_raw_fd(master) }; let mut slave = unsafe { File::from_raw_fd(slave) }; - slave.write(&[0]).unwrap(); + slave.write_all(&[0]).unwrap(); let mut r = BufReader::new(master); let mut buf = vec![]; r.read_until(0, &mut buf).unwrap();