From 1c4af1bc09cba1e1028e0f4235e3d43c6c8ab3a7 Mon Sep 17 00:00:00 2001 From: soenkehahn Date: Fri, 22 Mar 2019 18:32:49 -0400 Subject: [PATCH] wip: failing test --- tests/recording.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/recording.rs b/tests/recording.rs index 8a5ec50..e5f0cee 100644 --- a/tests/recording.rs +++ b/tests/recording.rs @@ -8,7 +8,9 @@ #[path = "./utils.rs"] mod utils; +use quale::which; use scriptkeeper::context::Context; +use scriptkeeper::utils::path_to_string; use scriptkeeper::{cli, run_main, R}; use test_utils::{assert_eq_yaml, trim_margin, TempFile}; @@ -150,3 +152,24 @@ fn records_command_exitcodes() -> R<()> { "#, ) } + +#[test] +#[ignore] +fn records_stdout_of_commands() -> R<()> { + let echo = which("echo").ok_or("echo not found in $PATH")?; + test_recording( + &format!( + " + |#!/usr/bin/env bash + |{} foo > /dev/null + ", + path_to_string(&echo)? + ), + " + |protocols: + | - protocol: + | - command: echo foo + | stdout: foo + ", + ) +}