mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-29 16:38:56 +00:00
Snapshot test
This commit is contained in:
1 parent
a760e75f2f
commit
9bf42b337d
1 file changed
+14
-5
@@ -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]
|
||||
|
||||
Reference in new issue
Block a user