Skip to content

Commit

Permalink
Merge pull request #27 from b5g-ex/pojiro/patch
Browse files Browse the repository at this point in the history
Add version match test for Cargo.lock
  • Loading branch information
takasehideki authored Feb 22, 2024
2 parents 7babb90 + 2651496 commit 5e3336a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/version_match_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ defmodule Zenohex.VersionMatchTest do
version_on_cargo_toml =
Toml.decode_file!("native/zenohex_nif/Cargo.toml")["package"]["version"]

version_on_cargo_lock =
Toml.decode_file!("native/zenohex_nif/Cargo.lock")["package"]
|> Enum.filter(fn map -> map["name"] == "zenohex_nif" end)
|> List.first()
|> Map.get("version")

assert version_on_mix_exs == version_on_cargo_toml
assert version_on_mix_exs == version_on_cargo_lock
end
end
end

0 comments on commit 5e3336a

Please sign in to comment.