tests/test-check-cargo-lock.t
author Martin von Zweigbergk <martinvonz@google.com>
Tue, 12 Apr 2022 11:40:37 -0700
changeset 49142 bfc117647c71
parent 45656 ba0d93a5f06f
permissions -rw-r--r--
rust-revlog: move check for nodemap requirement to caller It's good for both making `Revlog` testable and reusable to have it not depend on the higher-level `Repo` type. This patch is one step in towards that. Additionally, this change in particular gives the callers more control over when to use a nodemap. Differential Revision: https://phab.mercurial-scm.org/D12546

#require cargo test-repo
  $ . "$TESTDIR/helpers-testrepo.sh"
  $ cd "$TESTDIR"/../rust

Check if Cargo.lock is up-to-date. Will fail with a 101 error code if not.

  $ cargo check --locked --all --quiet

However most CIs will run `cargo build` or similar before running the tests, so we need to check if it was modified

  $ testrepohg diff Cargo.lock