From 022b1081dcdaf8584ee51bc78d2e8fbfcc7d05ee Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Thu, 5 Dec 2024 19:16:24 +0100 Subject: [PATCH] mhh --- Justfile | 3 +++ test-workspace/Cargo.toml | 5 ++--- test-workspace/mods/mod-clap/Cargo.toml | 6 ++++++ test-workspace/mods/mod-clap/src/lib.rs | 14 ++++++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 Justfile create mode 100644 test-workspace/mods/mod-clap/Cargo.toml create mode 100644 test-workspace/mods/mod-clap/src/lib.rs diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..476adc0 --- /dev/null +++ b/Justfile @@ -0,0 +1,3 @@ + +test: + cargo build --release -p con-cli diff --git a/test-workspace/Cargo.toml b/test-workspace/Cargo.toml index a290725..817396b 100644 --- a/test-workspace/Cargo.toml +++ b/test-workspace/Cargo.toml @@ -1,8 +1,7 @@ [workspace] members = [ - "con", - "con-cli", - "con-loader", "test-workspace/app", + "app", + "mods/*", ] exclude = [ "test-workspace", diff --git a/test-workspace/mods/mod-clap/Cargo.toml b/test-workspace/mods/mod-clap/Cargo.toml new file mode 100644 index 0000000..17bb7bf --- /dev/null +++ b/test-workspace/mods/mod-clap/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "mod-clap" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/test-workspace/mods/mod-clap/src/lib.rs b/test-workspace/mods/mod-clap/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/test-workspace/mods/mod-clap/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +}