Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Allow the tooltip tests to run in isolation #1159

Merged
merged 2 commits into from
Nov 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/actions/hover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,15 @@ pub mod test {
/// Creates a new `TooltipTestHarness`. The `project_dir` must contain
/// a valid rust project with a `Cargo.toml`.
pub fn new<O: Output>(project_dir: PathBuf, output: &O) -> TooltipTestHarness {
use env_logger;
let _ = env_logger::try_init();

// Prevent the hover test project build from trying to use the rls test
// binary as a rustc shim. See RlsExecutor::exec for more information.
if env::var("RUSTC").is_err() {
env::set_var("RUSTC", "rustc");
}

let pid = process::id();
let client_caps = ClientCapabilities {
code_completion_has_snippet_support: true,
Expand Down
File renamed without changes.