tests/test-check-rust-format.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 28 Feb 2020 00:31:14 +0100
changeset 44527 448d700e0d27
parent 43837 e8a3bbffdc7d
child 44844 f44a7d8660ea
permissions -rw-r--r--
nodemap: make sure the nodemap docket is updated after the changelog It is better to have a lagging nodemap than a nodemap pointing to node that does not exists yet. (strictly speaking, the order was already right, however we make it more explicit). Differential Revision: https://phab.mercurial-scm.org/D8188
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
43837
e8a3bbffdc7d tests: add test for Rust formatting
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     1
#require rustfmt test-repo
e8a3bbffdc7d tests: add test for Rust formatting
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     2
e8a3bbffdc7d tests: add test for Rust formatting
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     3
  $ . "$TESTDIR/helpers-testrepo.sh"
e8a3bbffdc7d tests: add test for Rust formatting
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     4
e8a3bbffdc7d tests: add test for Rust formatting
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     5
  $ cd "$TESTDIR"/..
e8a3bbffdc7d tests: add test for Rust formatting
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     6
  $ RUSTFMT=$(rustup which --toolchain nightly rustfmt)
e8a3bbffdc7d tests: add test for Rust formatting
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     7
  $ for f in `testrepohg files 'glob:**/*.rs'` ; do
e8a3bbffdc7d tests: add test for Rust formatting
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     8
  >   $RUSTFMT --check --unstable-features --color=never $f
e8a3bbffdc7d tests: add test for Rust formatting
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     9
  > done