Skip to content

Commit

Permalink
more meaningful test
Browse files Browse the repository at this point in the history
  • Loading branch information
kbvernon committed Oct 20, 2024
1 parent 5852ea1 commit bcb0455
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/testthat/test-read_cargo_metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
)
})

0 comments on commit bcb0455

Please sign in to comment.