diff --git a/tests/testthat/test-read_cargo_metadata.R b/tests/testthat/test-read_cargo_metadata.R index 79feaff1..6ec99b6e 100644 --- a/tests/testthat/test-read_cargo_metadata.R +++ b/tests/testthat/test-read_cargo_metadata.R @@ -11,4 +11,28 @@ test_that("read_cargo_metadata() returns crate or workspace metadata", { out <- read_cargo_metadata(path) expect_type(out, "list") + + expect_equal( + out[["packages"]][["name"]], + "testpkg" + ) + + expect_equal( + out[["packages"]][["version"]], + "0.1.0" + ) + + expect_equal( + out[["packages"]][["dependencies"]][[1]][["name"]], + "extendr-api" + ) + + expect_equal( + out[["workspace_root"]], + normalizePath( + file.path(path, "src", "rust"), + winslash = "\\", + mustWork = FALSE + ) + ) })