From e274c7a23484d142538daa268ac46d2a32a34683 Mon Sep 17 00:00:00 2001 From: Jun Huang Date: Sun, 22 Dec 2024 15:15:24 +0800 Subject: [PATCH] Fix testcase for running tests --- tests/data/script-test.rs | 2 ++ tests/tests/script.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/tests/data/script-test.rs b/tests/data/script-test.rs index c61e54b..fcf23ec 100644 --- a/tests/data/script-test.rs +++ b/tests/data/script-test.rs @@ -1,2 +1,4 @@ +fn main() {} + #[test] fn test() {} diff --git a/tests/tests/script.rs b/tests/tests/script.rs index 73bdb51..bfcb20f 100644 --- a/tests/tests/script.rs +++ b/tests/tests/script.rs @@ -89,6 +89,7 @@ fn test_script_short_without_main() { fn test_script_test() { let out = rust_script!("--test", "tests/data/script-test.rs").unwrap(); assert!(out.success()); + assert!(out.stdout.contains("running 1 test")); } #[test]