Dever v0.0.2
This commit is contained in:
commit
e6e175ebcf
816 files changed
+120349
No files matched your search
@@ -0,0 +1,40 @@
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn parallel_executes_concurrent_polling_error_order_borrows_moves_and_cancellation() {
|
||||
for profile in [Profile::Dev, Profile::Release] {
|
||||
let binary = build(
|
||||
"parallel",
|
||||
include_str!("parallel.dever"),
|
||||
Some(include_str!("parallel.rs.txt")),
|
||||
profile,
|
||||
);
|
||||
let output = Command::new(binary).output().unwrap();
|
||||
assert!(
|
||||
output.status.success(),
|
||||
"{}",
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parallel_cmd_executes_the_checked_group() {
|
||||
let binary = build(
|
||||
"parallel-command",
|
||||
include_str!("parallel.dever"),
|
||||
None,
|
||||
Profile::Dev,
|
||||
);
|
||||
let output = Command::new(binary)
|
||||
.args(["main.main.together", "{}"])
|
||||
.output()
|
||||
.unwrap();
|
||||
assert!(
|
||||
output.status.success(),
|
||||
"{}",
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
);
|
||||
let value: serde_json::Value = serde_json::from_slice(&output.stdout).unwrap();
|
||||
assert_eq!(value["data"], serde_json::json!({"left":11,"right":22}));
|
||||
}
|
||||
Reference in new issue
Block a user