Skip to content

Commit

Permalink
added additional test package
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippPolterauer committed Jan 17, 2024
1 parent 1c453aa commit 907c12f
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/testpackage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "testpackage"
version = "0.1.0"
edition = "2021"
publish = false
default-run = "main"

[[bin]]
name = "another"
Expand Down
7 changes: 7 additions & 0 deletions tests/testpackage_nodefault/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions tests/testpackage_nodefault/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "testpackage"
version = "0.1.0"
edition = "2021"
publish = false

[[bin]]
name = "another"
path = "src/another/main.rs"

[[bin]]
name = "main"
path = "src/main.rs"

[profile.samply]
inherits = "release"
debug = true
3 changes: 3 additions & 0 deletions tests/testpackage_nodefault/examples/hello.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
9 changes: 9 additions & 0 deletions tests/testpackage_nodefault/src/another/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
fn main(){
// read arguments
let args = std::env::args().collect::<Vec<String>>();
if args.len() < 2 {
println!("Hello, world!");
}else{
println!("Hello, {}!", args[1]);
}
}
3 changes: 3 additions & 0 deletions tests/testpackage_nodefault/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

0 comments on commit 907c12f

Please sign in to comment.