message: Fix several issues with close_output test.
diff: @@ -4840,6 +4840,9 @@ fn close_output() {
  [lib]
  proc-macro = true
  +
  + [[bin]]
  + name = "foobar"
  "#,
  )
  .file(
  @@ -4864,7 +4867,6 @@ fn close_output() {
  } else {
  println!("{}", i);
  }
  - std::thread::sleep(std::time::Duration::new(0, 1));
  }
  TokenStream::new()
  }
  @@ -4872,7 +4874,7 @@ fn close_output() {
  .replace("__ADDR__", &addr.to_string()),
  )
  .file(
  - "src/main.rs",
  + "src/bin/foobar.rs",
  r#"
  foo::repro!();
  @@ -4913,6 +4915,7 @@ fn close_output() {
  };
  let stderr = spawn(false);
  + assert!(
  lines_match(
  "\
  [COMPILING] foo [..]
  @@ -4922,10 +4925,17 @@ hello stderr!
  [ERROR] build failed
  ",
  &stderr,
  + ),
  + "lines differ:\n{}",
  + stderr
  );
  // Try again with stderr.
  p.build_dir().rm_rf();
  let stdout = spawn(true);
  - lines_match("hello_stdout!", &stdout);
  + assert!(
  + lines_match("hello stdout!\n", &stdout),
  + "lines differ:\n{}",
  + stdout
  + );
  }
  