Skip to content

Commit

Permalink
Fix the run_ignored issue while supporting both nightly and stable
Browse files Browse the repository at this point in the history
Fixes #133
Fixes #131
  • Loading branch information
Thomas Jespersen committed Oct 28, 2018
1 parent 4b6b7c7 commit 9df065f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,16 @@ pub fn run_tests(config: &Config) {
}

pub fn test_opts(config: &Config) -> test::TestOpts {
#[cfg(feature = "stable")]
let run_ignored = config.run_ignored;

#[cfg(not(feature = "stable"))]
let run_ignored = if config.run_ignored { test::RunIgnored::Yes } else { test::RunIgnored::No };

test::TestOpts {
filter: config.filter.clone(),
filter_exact: config.filter_exact,
run_ignored: if config.run_ignored { test::RunIgnored::Yes } else { test::RunIgnored::No },
run_ignored: run_ignored,
format: if config.quiet { test::OutputFormat::Terse } else { test::OutputFormat::Pretty },
logfile: config.logfile.clone(),
run_tests: true,
Expand Down

0 comments on commit 9df065f

Please sign in to comment.