Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Jul 15, 2024
1 parent 7caa93a commit 3719bef
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions cmd/crates/soroban-test/tests/it/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,24 @@ error: package nopkgwiththisname not found
",
));
}

#[test]
fn build_all_when_in_non_package_directory() {
let sandbox = TestEnv::default();
let cargo_dir = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));
let fixture_path = cargo_dir.join("tests/fixtures/workspace/contracts/add/src/");
sandbox
.new_assert_cmd("contract")
.current_dir(fixture_path)
.arg("build")
.arg("--print-commands-only")
.assert()
.success()
.stdout(predicate::eq(
"\
cargo rustc --manifest-path=../Cargo.toml --crate-type=cdylib --target=wasm32-unknown-unknown --release
cargo rustc --manifest-path=../../call/Cargo.toml --crate-type=cdylib --target=wasm32-unknown-unknown --release
cargo rustc --manifest-path=../add2/Cargo.toml --crate-type=cdylib --target=wasm32-unknown-unknown --release
",
));
}

0 comments on commit 3719bef

Please sign in to comment.