Files
core/test/rust/native/stdout.rs.txt
T
2026-11-27 06:03:56 +00:00

19 lines
966 B
Plaintext

if std::env::args().any(|value| value == "fail") {
let error = @printLine@("private output text").unwrap_err();
let Failure::@WriteResult@(@WriteResult@::Failed(message)) = error else {
panic!("original write error required");
};
assert!(!message.is_empty());
assert!(!message.contains("private output text"));
let failure = dever_runtime::task::run(true, 1, async |scope| @offload@(scope, "worker failure".to_owned()).await).unwrap().unwrap_err();
assert!(matches!(failure, dever_runtime::task::RunError::Business {
error: Failure::@WriteResult@(@WriteResult@::Failed(_)), ..
}));
return;
}
@printLine@("雪😀").unwrap();
@printLine@("").unwrap();
@printLine@("first\nsecond").unwrap();
dever_runtime::task::run(true, 1, async |scope| @offload@(scope, "blocking".to_owned()).await).unwrap().unwrap();
dever_runtime::task::run(true, 1, async |scope| @spawned@(scope, "task".to_owned()).await).unwrap().unwrap();