tests/test-check-rust-format.t
author Martin von Zweigbergk <martinvonz@google.com>
Tue, 03 Nov 2020 20:20:49 -0800
changeset 45838 d6279c43fc60
parent 44844 f44a7d8660ea
child 46002 d42809b6b10f
permissions -rw-r--r--
serve: simply return instead of calling sys.exit() in `hg serve --stdio` The shouldn't be a reason to call `sys.exit()` instead of letting the code return normally. I've remove the call in both `hg serve` and `hg debugserve`. Differential Revision: https://phab.mercurial-scm.org/D9271
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
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