tests/test-check-cargo-lock.t
author Simon Sapin <simon.sapin@octobus.net>
Thu, 11 Feb 2021 15:51:11 +0100
changeset 46599 1f55cd5b292f
parent 45654 ba0d93a5f06f
permissions -rw-r--r--
rust: Add a log file rotation utility This is ported to Rust from `mercurial/loggingutil.py`. The "builder" pattern is used to make it visible at call sites what the two numeric parameters mean. In Python they might simply by keyword arguments. Differential Revision: https://phab.mercurial-scm.org/D10010

#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