diff options
Diffstat (limited to 'crates/test_utils')
-rw-r--r-- | crates/test_utils/src/lib.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/test_utils/src/lib.rs b/crates/test_utils/src/lib.rs index 0c367ce71..6a8d06ea7 100644 --- a/crates/test_utils/src/lib.rs +++ b/crates/test_utils/src/lib.rs | |||
@@ -161,10 +161,8 @@ pub fn add_cursor(text: &str, offset: TextSize) -> String { | |||
161 | 161 | ||
162 | #[derive(Debug, Eq, PartialEq)] | 162 | #[derive(Debug, Eq, PartialEq)] |
163 | pub struct FixtureEntry { | 163 | pub struct FixtureEntry { |
164 | pub meta: String, | 164 | pub meta: FixtureMeta, |
165 | pub text: String, | 165 | pub text: String, |
166 | |||
167 | pub parsed_meta: FixtureMeta, | ||
168 | } | 166 | } |
169 | 167 | ||
170 | #[derive(Debug, Eq, PartialEq)] | 168 | #[derive(Debug, Eq, PartialEq)] |
@@ -231,8 +229,8 @@ The offending line: {:?}"#, | |||
231 | for line in lines.by_ref() { | 229 | for line in lines.by_ref() { |
232 | if line.starts_with("//-") { | 230 | if line.starts_with("//-") { |
233 | let meta = line["//-".len()..].trim().to_string(); | 231 | let meta = line["//-".len()..].trim().to_string(); |
234 | let parsed_meta = parse_meta(&meta); | 232 | let meta = parse_meta(&meta); |
235 | res.push(FixtureEntry { meta, parsed_meta, text: String::new() }) | 233 | res.push(FixtureEntry { meta, text: String::new() }) |
236 | } else if let Some(entry) = res.last_mut() { | 234 | } else if let Some(entry) = res.last_mut() { |
237 | entry.text.push_str(line); | 235 | entry.text.push_str(line); |
238 | entry.text.push('\n'); | 236 | entry.text.push('\n'); |