chore(release): prepare public source release

This commit is contained in:
MercuryToolbox Release
2026-07-18 15:41:59 +08:00
commit e365e5df4d
508 changed files with 163373 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
//! Integration tests for the `proctree` command.
use assert_cmd::Command;
use predicates::prelude::*;
fn cargo_command() -> Command {
Command::cargo_bin("proctree").expect("binary")
}
#[test]
fn reports_rooted_run_tree_as_json() {
let mut command = cargo_command();
command
.arg("run")
.arg("--json")
.arg("--")
.arg("pwsh")
.arg("-NoProfile")
.arg("-Command")
.arg("Start-Process pwsh -ArgumentList '-NoProfile','-Command','Start-Sleep -Milliseconds 800' -PassThru | Out-Null; Start-Sleep -Milliseconds 200")
.assert()
.success()
.stdout(predicate::str::contains("\"root_pid\""))
.stdout(predicate::str::contains("\"nodes\""))
.stdout(predicate::str::contains("\"image_name\":\"pwsh.exe\""));
}
#[test]
fn help_includes_proctree_examples() {
let mut command = cargo_command();
command
.arg("--help")
.assert()
.success()
.stdout(predicate::str::contains("system"))
.stdout(predicate::str::contains("root <PID>"))
.stdout(predicate::str::contains("ConvertFrom-Json"));
}