Add #[ignore] to test that runs external process (#3690)

This commit is contained in:
Seiichi Uchida 2019-07-16 19:36:23 +09:00 committed by GitHub
parent 640b8d0257
commit 66c27c9161
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 20 additions and 14 deletions

View File

@ -49,6 +49,7 @@ script:
if [ -z ${INTEGRATION} ]; then
cargo build
cargo test
cargo test -- --ignored
else
./ci/integration.sh
fi

View File

@ -50,3 +50,4 @@ build: false
test_script:
- cargo build --verbose
- cargo test
- cargo test -- --ignored

View File

@ -16,7 +16,7 @@
//! following values of `chain_indent`:
//! Block:
//!
//! ```ignore
//! ```text
//! let foo = {
//! aaaa;
//! bbb;
@ -27,7 +27,7 @@
//!
//! Visual:
//!
//! ```ignore
//! ```text
//! let foo = {
//! aaaa;
//! bbb;
@ -41,7 +41,7 @@
//! the braces.
//! Block:
//!
//! ```ignore
//! ```text
//! let a = foo.bar
//! .baz()
//! .qux
@ -49,7 +49,7 @@
//!
//! Visual:
//!
//! ```ignore
//! ```text
//! let a = foo.bar
//! .baz()
//! .qux
@ -454,7 +454,7 @@ trait ChainFormatter {
// Parent is the first item in the chain, e.g., `foo` in `foo.bar.baz()`.
// Root is the parent plus any other chain items placed on the first line to
// avoid an orphan. E.g.,
// ```ignore
// ```text
// foo.bar
// .baz()
// ```
@ -516,7 +516,7 @@ impl<'a> ChainFormatterShared<'a> {
// know whether 'overflowing' the last child make a better formatting:
//
// A chain with overflowing the last child:
// ```ignore
// ```text
// parent.child1.child2.last_child(
// a,
// b,
@ -525,7 +525,7 @@ impl<'a> ChainFormatterShared<'a> {
// ```
//
// A chain without overflowing the last child (in vertical layout):
// ```ignore
// ```text
// parent
// .child1
// .child2
@ -534,7 +534,7 @@ impl<'a> ChainFormatterShared<'a> {
//
// In particular, overflowing is effective when the last child is a method with a multi-lined
// block-like argument (e.g., closure):
// ```ignore
// ```text
// parent.child1.child2.last_child(|a, b, c| {
// let x = foo(a, b, c);
// let y = bar(a, b, c);

View File

@ -82,7 +82,7 @@ impl TemplateParser {
///
/// # Examples
///
/// ```ignore
/// ```text
/// assert_eq!(
/// TemplateParser::parse(
/// r"

View File

@ -1417,7 +1417,7 @@ impl MacroBranch {
///
/// # Expected syntax
///
/// ```ignore
/// ```text
/// lazy_static! {
/// [pub] static ref NAME_1: TYPE_1 = EXPR_1;
/// [pub] static ref NAME_2: TYPE_2 = EXPR_2;

View File

@ -507,7 +507,7 @@ pub(crate) fn remove_trailing_white_spaces(text: &str) -> String {
/// Indent each line according to the specified `indent`.
/// e.g.
///
/// ```rust,ignore
/// ```rust,compile_fail
/// foo!{
/// x,
/// y,
@ -521,7 +521,7 @@ pub(crate) fn remove_trailing_white_spaces(text: &str) -> String {
///
/// will become
///
/// ```rust,ignore
/// ```rust,compile_fail
/// foo!{
/// x,
/// y,

View File

@ -46,6 +46,7 @@ macro_rules! assert_that {
};
}
#[ignore]
#[test]
fn version() {
assert_that!(&["--version"], starts_with("rustfmt "));
@ -54,6 +55,7 @@ fn version() {
assert_that!(&["--", "--version"], starts_with("rustfmt "));
}
#[ignore]
#[test]
fn print_config() {
assert_that!(
@ -62,6 +64,7 @@ fn print_config() {
);
}
#[ignore]
#[test]
fn rustfmt_help() {
assert_that!(&["--", "--help"], contains("Format Rust code"));

View File

@ -48,6 +48,7 @@ macro_rules! assert_that {
};
}
#[ignore]
#[test]
fn print_config() {
assert_that!(

View File

@ -17,7 +17,7 @@
/// ```
///
/// Should not format with ignore attribute
/// ```ignore
/// ```text
/// .--------------.
/// | v
/// Park <- Idle -> Poll -> Probe -> Download -> Install -> Reboot

View File

@ -18,7 +18,7 @@
/// ```
///
/// Should not format with ignore attribute
/// ```ignore
/// ```text
/// .--------------.
/// | v
/// Park <- Idle -> Poll -> Probe -> Download -> Install -> Reboot