Skip to content

Commit

Permalink
Add version match test for Cargo.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
pojiro committed Feb 22, 2024
1 parent 7babb90 commit 2651496
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 2651496

Please sign in to comment.