This causes the background executor to hang Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
@@ -276,8 +276,8 @@ mod tests {
|
||||
use util::{path, rel_path::rel_path};
|
||||
use worktree::WorktreeSettings;
|
||||
|
||||
#[gpui::test]
|
||||
fn test_parse_conflicts_in_buffer(cx: &mut TestAppContext) {
|
||||
#[test]
|
||||
fn test_parse_conflicts_in_buffer() {
|
||||
// Create a buffer with conflict markers
|
||||
let test_content = r#"
|
||||
This is some text before the conflict.
|
||||
@@ -299,12 +299,7 @@ mod tests {
|
||||
.unindent();
|
||||
|
||||
let buffer_id = BufferId::new(1).unwrap();
|
||||
let buffer = Buffer::new(
|
||||
ReplicaId::LOCAL,
|
||||
buffer_id,
|
||||
test_content,
|
||||
cx.background_executor(),
|
||||
);
|
||||
let buffer = Buffer::new(ReplicaId::LOCAL, buffer_id, test_content);
|
||||
let snapshot = buffer.snapshot();
|
||||
|
||||
let conflict_snapshot = ConflictSet::parse(&snapshot);
|
||||
@@ -360,8 +355,8 @@ mod tests {
|
||||
assert_eq!(conflicts_in_range.len(), 0);
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
fn test_nested_conflict_markers(cx: &mut TestAppContext) {
|
||||
#[test]
|
||||
fn test_nested_conflict_markers() {
|
||||
// Create a buffer with nested conflict markers
|
||||
let test_content = r#"
|
||||
This is some text before the conflict.
|
||||
@@ -379,12 +374,7 @@ mod tests {
|
||||
.unindent();
|
||||
|
||||
let buffer_id = BufferId::new(1).unwrap();
|
||||
let buffer = Buffer::new(
|
||||
ReplicaId::LOCAL,
|
||||
buffer_id,
|
||||
test_content,
|
||||
cx.background_executor(),
|
||||
);
|
||||
let buffer = Buffer::new(ReplicaId::LOCAL, buffer_id, test_content);
|
||||
let snapshot = buffer.snapshot();
|
||||
|
||||
let conflict_snapshot = ConflictSet::parse(&snapshot);
|
||||
@@ -406,8 +396,8 @@ mod tests {
|
||||
assert_eq!(their_text, "This is their version in a nested conflict\n");
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
fn test_conflict_markers_at_eof(cx: &mut TestAppContext) {
|
||||
#[test]
|
||||
fn test_conflict_markers_at_eof() {
|
||||
let test_content = r#"
|
||||
<<<<<<< ours
|
||||
=======
|
||||
@@ -415,20 +405,15 @@ mod tests {
|
||||
>>>>>>> "#
|
||||
.unindent();
|
||||
let buffer_id = BufferId::new(1).unwrap();
|
||||
let buffer = Buffer::new(
|
||||
ReplicaId::LOCAL,
|
||||
buffer_id,
|
||||
test_content,
|
||||
cx.background_executor(),
|
||||
);
|
||||
let buffer = Buffer::new(ReplicaId::LOCAL, buffer_id, test_content);
|
||||
let snapshot = buffer.snapshot();
|
||||
|
||||
let conflict_snapshot = ConflictSet::parse(&snapshot);
|
||||
assert_eq!(conflict_snapshot.conflicts.len(), 1);
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
fn test_conflicts_in_range(cx: &mut TestAppContext) {
|
||||
#[test]
|
||||
fn test_conflicts_in_range() {
|
||||
// Create a buffer with conflict markers
|
||||
let test_content = r#"
|
||||
one
|
||||
@@ -462,12 +447,7 @@ mod tests {
|
||||
.unindent();
|
||||
|
||||
let buffer_id = BufferId::new(1).unwrap();
|
||||
let buffer = Buffer::new(
|
||||
ReplicaId::LOCAL,
|
||||
buffer_id,
|
||||
test_content.clone(),
|
||||
cx.background_executor(),
|
||||
);
|
||||
let buffer = Buffer::new(ReplicaId::LOCAL, buffer_id, test_content.clone());
|
||||
let snapshot = buffer.snapshot();
|
||||
|
||||
let conflict_snapshot = ConflictSet::parse(&snapshot);
|
||||
|
||||
Reference in New Issue
Block a user