tests/test-check-rust-format.t
author Yuya Nishihara <yuya@tcha.org>
Fri, 17 Apr 2020 19:35:18 +0900
changeset 44732 f44a7d8660ea
parent 43819 e8a3bbffdc7d
child 45987 d42809b6b10f
permissions -rw-r--r--
test-check-rust-format: specify --edition=2018 rustfmt doesn't read Cargo.toml unless it's executed by cargo. https://github.com/rust-lang/rustfmt#rusts-editions

#require rustfmt test-repo

  $ . "$TESTDIR/helpers-testrepo.sh"

  $ cd "$TESTDIR"/..
  $ RUSTFMT=$(rustup which --toolchain nightly rustfmt)
  $ for f in `testrepohg files 'glob:**/*.rs'` ; do
  >   $RUSTFMT --check --edition=2018 --unstable-features --color=never $f
  > done