diff --git a/crates/moon/tests/mod.rs b/crates/moon/tests/mod.rs index 4d8e219b..f6700629 100644 --- a/crates/moon/tests/mod.rs +++ b/crates/moon/tests/mod.rs @@ -45,6 +45,7 @@ pub fn moon_bin() -> PathBuf { snapbox::cmd::cargo_bin("moon") } +#[track_caller] pub fn get_stdout_with_args_without_replace( dir: &impl AsRef, args: impl IntoIterator>, @@ -79,6 +80,7 @@ pub fn get_stderr_with_args_without_replace( s } +#[track_caller] pub fn get_stdout_with_args( dir: &impl AsRef, args: impl IntoIterator>, @@ -108,6 +110,7 @@ pub fn replace_dir(s: &str, dir: &impl AsRef) -> String { s.replace("\r\n", "\n").replace('\\', "/") } +#[track_caller] pub fn get_stdout_with_args_and_replace_dir( dir: &impl AsRef, args: impl IntoIterator>, diff --git a/crates/moon/tests/test_cases/mod.rs b/crates/moon/tests/test_cases/mod.rs index a6ff0240..67efff16 100644 --- a/crates/moon/tests/test_cases/mod.rs +++ b/crates/moon/tests/test_cases/mod.rs @@ -2009,7 +2009,7 @@ fn test_expect_test() -> anyhow::Result<()> { assert!(out.contains("Total tests: 30, passed: 30, failed: 0.")); let updated = std::fs::read_to_string(tmp_dir_path.as_ref().join("lib").join("hello.mbt")).unwrap(); - assert!(updated.contains(r#"[a, b, c]"#)); + assert!(updated.contains(r#"["a", "b", "c"]"#)); let s = snapbox::cmd::Command::new(moon_bin()) .current_dir(&tmp_dir_path) @@ -4174,7 +4174,7 @@ fn test_moon_run_with_cli_args() { ["run", "main", "--", "δΈ­ζ–‡", "πŸ˜„πŸ‘", "hello", "1242"], ), expect![[r#" - [δΈ­ζ–‡, πŸ˜„πŸ‘, hello, 1242] + ["δΈ­ζ–‡", "πŸ˜„πŸ‘", "hello", "1242"] "#]], ); }