Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: automatically set cdylib library type at build time #212

Merged
merged 14 commits into from
Jun 15, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: use 'should_panic' to ensure correct error message is produced
  • Loading branch information
bmoxb committed Jun 15, 2022
commit 92d293a6f2b5854cc7a82d675b458220cc6b7ad8
5 changes: 4 additions & 1 deletion service/tests/build_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ fn not_shuttle() {
}

#[test]
#[should_panic(
expected = "Your Shuttle project must be a library. Please add `[lib]` to your Cargo.toml file."
)]
fn not_lib() {
let buf = Box::new(DummyWriter {});
let project_path = format!("{}/tests/resources/not-lib", env!("CARGO_MANIFEST_DIR"));
assert!(build_crate(Path::new(&project_path), buf).is_err());
build_crate(Path::new(&project_path), buf).unwrap();
}

#[test]
Expand Down