author | Raphaël Gomès <rgomes@octobus.net> |
Thu, 21 Oct 2021 14:03:33 +0200 | |
branch | stable |
changeset 47900 | f3e218ae3fd9 |
parent 46002 | d42809b6b10f |
child 48297 | 9ebc10ad4a04 |
permissions | -rw-r--r-- |
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"/.. |
46002
d42809b6b10f
rust-format: pin the formatted to a specific nightly version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44844
diff
changeset
|
6 |
$ RUSTFMT=$(rustup which --toolchain nightly-2020-10-04 rustfmt) |
43837
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 |
44844
f44a7d8660ea
test-check-rust-format: specify --edition=2018
Yuya Nishihara <yuya@tcha.org>
parents:
43837
diff
changeset
|
8 |
> $RUSTFMT --check --edition=2018 --unstable-features --color=never $f |
43837
e8a3bbffdc7d
tests: add test for Rust formatting
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
9 |
> done |