From f7997ff77d290fab9fe9f582e4d666b9184f2842 Mon Sep 17 00:00:00 2001 From: Harshit Vijay Date: Fri, 14 Jun 2024 01:48:18 +0530 Subject: [PATCH] added all and basic test --- tests/test.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/test.rs diff --git a/tests/test.rs b/tests/test.rs new file mode 100644 index 0000000..3436918 --- /dev/null +++ b/tests/test.rs @@ -0,0 +1,23 @@ +#[cfg(test)] +mod tests { + use std::process::Command; + + use super::*; // Import the functions from the parent module + + #[test] + fn test_ospect_runs() { + let result = Command::new("./ospect") + .output() + .expect("Failed to execute command"); + assert!(result.status.success()); + } + + #[test] + fn test_ospect_all_runs() { + let result = Command::new("./ospect") + .arg("all") + .output() + .expect("Failed to execute command"); + assert!(result.status.success()); + } +} \ No newline at end of file