Skip to content

Commit

Permalink
Added subfolder to test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Wilkens authored and Jonas Wilkens committed May 21, 2021
1 parent 9fe64d9 commit abba852
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/main.rs
Original file line number Diff line number Diff line change
@@ -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());
}
21 changes: 21 additions & 0 deletions test/output.rs
Original file line number Diff line number Diff line change
@@ -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());
}
1 change: 1 addition & 0 deletions test/subdir/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod subdirfile;
3 changes: 3 additions & 0 deletions test/subdir/subdirfile.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub fn my_life() -> String {
String::from("MY LIFE")
}

0 comments on commit abba852

Please sign in to comment.