Add #[ignore] to test that runs external process (#3690)
This commit is contained in:
parent
640b8d0257
commit
66c27c9161
@ -49,6 +49,7 @@ script:
|
||||
if [ -z ${INTEGRATION} ]; then
|
||||
cargo build
|
||||
cargo test
|
||||
cargo test -- --ignored
|
||||
else
|
||||
./ci/integration.sh
|
||||
fi
|
||||
|
@ -50,3 +50,4 @@ build: false
|
||||
test_script:
|
||||
- cargo build --verbose
|
||||
- cargo test
|
||||
- cargo test -- --ignored
|
||||
|
@ -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);
|
||||
|
@ -82,7 +82,7 @@ impl TemplateParser {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```ignore
|
||||
/// ```text
|
||||
/// assert_eq!(
|
||||
/// TemplateParser::parse(
|
||||
/// r"
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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"));
|
||||
|
@ -48,6 +48,7 @@ macro_rules! assert_that {
|
||||
};
|
||||
}
|
||||
|
||||
#[ignore]
|
||||
#[test]
|
||||
fn print_config() {
|
||||
assert_that!(
|
||||
|
@ -17,7 +17,7 @@
|
||||
/// ```
|
||||
///
|
||||
/// Should not format with ignore attribute
|
||||
/// ```ignore
|
||||
/// ```text
|
||||
/// .--------------.
|
||||
/// | v
|
||||
/// Park <- Idle -> Poll -> Probe -> Download -> Install -> Reboot
|
||||
|
@ -18,7 +18,7 @@
|
||||
/// ```
|
||||
///
|
||||
/// Should not format with ignore attribute
|
||||
/// ```ignore
|
||||
/// ```text
|
||||
/// .--------------.
|
||||
/// | v
|
||||
/// Park <- Idle -> Poll -> Probe -> Download -> Install -> Reboot
|
||||
|
Loading…
x
Reference in New Issue
Block a user