Skip to content

Commit

Permalink
Add a test for -Zbuild-std. (#9)
Browse files Browse the repository at this point in the history
-Zbuild-std works with the `extern crate eyra;` trick, even if it
doesn't work with the `std = { package = "eyra" }` trick.
  • Loading branch information
sunfishcode authored Oct 3, 2023
1 parent 49d953c commit 45e460c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/example_crates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,21 @@ fn example_crate_extern_crate_hello_world() {
);
}

/// Like `example_crate_extern_crate_hello_world` but uses `-Zbuild-std`. This
/// doesn't work with `example_crate_hello_world` because of the `std` trick,
/// but it does work with the `extern crate eyra;` trick.
#[test]
fn example_crate_extern_crate_hello_world_z_build_std() {
test_crate(
"extern-crate-hello-world",
&["-Zbuild-std"],
&[],
"Hello, world!\n",
"",
None,
);
}

#[test]
fn example_crate_eyra_libc_example() {
test_crate(
Expand Down

0 comments on commit 45e460c

Please sign in to comment.