Snapshot test

This commit is contained in:
David Peter
2026-10-05 12:04:09 +02:00
parent a760e75f2f
commit 9bf42b337d
+14 -5
View File
@@ -931,14 +931,23 @@ fn invalid_command_options_preserve_export_files() {
#[test]
fn markdown_export_preserves_backticks_and_pipes_in_command_names() {
hyperfine_debug()
let _settings = snapshot_settings().bind_to_scope();
assert_cmd_snapshot!(hyperfine_debug()
.arg("--style=none")
.arg("--export-markdown=-")
.arg("--command-name=echo `uname` | cat")
.arg("sleep 1")
.assert()
.success()
.stdout(predicate::str::contains("| `` echo `uname` \\| cat `` |"));
.arg("sleep 1"), @r"
success: true
exit_code: 0
----- stdout -----
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|:---|---:|---:|---:|---:|
| `` echo `uname` \| cat `` | 1.000 ± 0.000 | 1.000 | 1.000 | 1.00 |
----- stderr -----
");
}
#[test]