Ensure tests pass on the beta compiler

Also add a travis matrix entry for emulating the beta tests
This commit is contained in:
Alex Crichton 2018-05-08 18:04:43 -07:00
parent f8aed3d71a
commit 47742807f7
2 changed files with 9 additions and 0 deletions

View File

@ -11,6 +11,11 @@ cache:
directories:
- $HOME/.cargo
matrix:
include:
# Make sure tests will pass on beta
- env: CFG_RELEASE_CHANNEL=beta
addons:
apt:
packages:

View File

@ -191,6 +191,10 @@ fn assert_output(source: &Path, expected_filename: &Path) {
// rustfmt.
#[test]
fn idempotence_tests() {
match option_env!("CFG_RELEASE_CHANNEL") {
None | Some("nightly") => {}
_ => return, // these tests require nightly
}
// Get all files in the tests/target directory.
let files = get_test_files(Path::new("tests/target"), true);
let (_reports, count, fails) = check_files(files, None);