From abba8525b9c8dbf9d3555100b24c7c9d4bf7b872 Mon Sep 17 00:00:00 2001 From: Jonas Wilkens Date: Fri, 21 May 2021 19:03:06 +0200 Subject: [PATCH] Added subfolder to test setup --- test/main.rs | 4 +++- test/output.rs | 21 +++++++++++++++++++++ test/subdir/mod.rs | 1 + test/subdir/subdirfile.rs | 3 +++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 test/output.rs create mode 100644 test/subdir/mod.rs create mode 100644 test/subdir/subdirfile.rs diff --git a/test/main.rs b/test/main.rs index b7803f5..3fd5e9a 100644 --- a/test/main.rs +++ b/test/main.rs @@ -1,8 +1,10 @@ mod elo; +mod subdir; use std::io; -use crate::elo; +use crate::subdir::subdirfile; fn main() { println!("{}", elo::lebo()); + println!("{}", subdirfile::my_life()); } \ No newline at end of file diff --git a/test/output.rs b/test/output.rs new file mode 100644 index 0000000..d524040 --- /dev/null +++ b/test/output.rs @@ -0,0 +1,21 @@ +mod elo { +pub fn lebo() -> String { + String::from("ELO") +} +} +mod subdir { +pub mod subdirfile { +pub fn my_life() -> String { + String::from("MY LIFE") +} +} + +} + +use std::io; +use crate::subdir::subdirfile; + +fn main() { + println!("{}", elo::lebo()); + println!("{}", subdirfile::my_life()); +} diff --git a/test/subdir/mod.rs b/test/subdir/mod.rs new file mode 100644 index 0000000..8a4d31a --- /dev/null +++ b/test/subdir/mod.rs @@ -0,0 +1 @@ +pub mod subdirfile; \ No newline at end of file diff --git a/test/subdir/subdirfile.rs b/test/subdir/subdirfile.rs new file mode 100644 index 0000000..b00dc71 --- /dev/null +++ b/test/subdir/subdirfile.rs @@ -0,0 +1,3 @@ +pub fn my_life() -> String { + String::from("MY LIFE") +} \ No newline at end of file