Skip to content

Commit aad9f36

Browse files
committed
add workspace test
1 parent d873727 commit aad9f36

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[workspace]
2+
members = ["world"]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[package]
2+
name = "world"
3+
version = "0.1.0"
4+
authors = ["Skgland <bb-github@t-online.de>"]
5+
edition = "2018"
6+
7+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8+
9+
[dependencies]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

tests/buildtest/mod.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,21 @@ fn test_cargo_config() {
9797
});
9898
}
9999

100+
#[test]
101+
fn workspace() {
102+
runner::run("workspace", |run| {
103+
run.build(SandboxBuilder::new().enable_networking(false), |build| {
104+
let storage = rustwide::logging::LogStorage::new(LevelFilter::Info);
105+
rustwide::logging::capture(&storage, || -> Result<_, Error> {
106+
build.cargo().args(&["run"]).run()?;
107+
Ok(())
108+
})?;
109+
Ok(())
110+
})?;
111+
Ok(())
112+
});
113+
}
114+
100115
test_prepare_error!(
101116
test_missing_cargotoml,
102117
"missing-cargotoml",

0 commit comments

Comments
 (0)