mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Add toolchain
meta for tests
This commit is contained in:
parent
5d41affc77
commit
584d2697cc
6 changed files with 66 additions and 44 deletions
|
@ -13,7 +13,7 @@ use project_model::ProjectManifest;
|
|||
use rust_analyzer::{config::Config, lsp_ext, main_loop};
|
||||
use serde::Serialize;
|
||||
use serde_json::{json, to_string_pretty, Value};
|
||||
use test_utils::Fixture;
|
||||
use test_utils::FixtureWithProjectMeta;
|
||||
use vfs::AbsPathBuf;
|
||||
|
||||
use crate::testdir::TestDir;
|
||||
|
@ -84,10 +84,12 @@ impl<'a> Project<'a> {
|
|||
profile::init_from(crate::PROFILE);
|
||||
});
|
||||
|
||||
let (mini_core, proc_macros, fixtures) = Fixture::parse(self.fixture);
|
||||
assert!(proc_macros.is_empty());
|
||||
let FixtureWithProjectMeta { fixture, mini_core, proc_macro_names, toolchain } =
|
||||
FixtureWithProjectMeta::parse(self.fixture);
|
||||
assert!(proc_macro_names.is_empty());
|
||||
assert!(mini_core.is_none());
|
||||
for entry in fixtures {
|
||||
assert!(toolchain.is_none());
|
||||
for entry in fixture {
|
||||
let path = tmp_dir.path().join(&entry.path['/'.len_utf8()..]);
|
||||
fs::create_dir_all(path.parent().unwrap()).unwrap();
|
||||
fs::write(path.as_path(), entry.text.as_bytes()).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue