Allow specifying MAX_EXCERPTS via an env variable in random tests
This commit is contained in:
@@ -1123,7 +1123,7 @@ mod tests {
|
||||
log::info!("initial buffer text: {:?}", text);
|
||||
MultiBuffer::build_simple(&text, cx)
|
||||
} else {
|
||||
MultiBuffer::build_random(rng.gen_range(1..=5), &mut rng, cx)
|
||||
MultiBuffer::build_random(&mut rng, cx)
|
||||
};
|
||||
|
||||
let mut buffer_snapshot = buffer.read(cx).snapshot(cx);
|
||||
|
||||
@@ -1252,7 +1252,7 @@ mod tests {
|
||||
let buffer = if rng.gen() {
|
||||
MultiBuffer::build_simple(&text, cx)
|
||||
} else {
|
||||
MultiBuffer::build_random(rng.gen_range(1..=5), &mut rng, cx)
|
||||
MultiBuffer::build_random(&mut rng, cx)
|
||||
};
|
||||
let mut buffer_snapshot = buffer.read(cx).snapshot(cx);
|
||||
let mut map = FoldMap::new(buffer_snapshot.clone()).0;
|
||||
|
||||
@@ -458,7 +458,7 @@ mod tests {
|
||||
let text = RandomCharIter::new(&mut rng).take(len).collect::<String>();
|
||||
MultiBuffer::build_simple(&text, cx)
|
||||
} else {
|
||||
MultiBuffer::build_random(rng.gen_range(1..=5), &mut rng, cx)
|
||||
MultiBuffer::build_random(&mut rng, cx)
|
||||
};
|
||||
let buffer_snapshot = buffer.read(cx).snapshot(cx);
|
||||
log::info!("Buffer text: {:?}", buffer_snapshot.text());
|
||||
|
||||
@@ -1021,7 +1021,7 @@ mod tests {
|
||||
|
||||
let buffer = cx.update(|cx| {
|
||||
if rng.gen() {
|
||||
MultiBuffer::build_random(rng.gen_range(1..=5), &mut rng, cx)
|
||||
MultiBuffer::build_random(&mut rng, cx)
|
||||
} else {
|
||||
let len = rng.gen_range(0..10);
|
||||
let text = RandomCharIter::new(&mut rng).take(len).collect::<String>();
|
||||
|
||||
Reference in New Issue
Block a user