fixup: use shorter test fixtures
This commit is contained in:
parent
b11bf9108b
commit
619a142e3d
1 changed files with 46 additions and 39 deletions
|
@ -5770,6 +5770,7 @@ async fn test_rewrap_block_comments(cx: &mut TestAppContext) {
|
|||
"Rust".into(),
|
||||
LanguageSettingsContent {
|
||||
allow_rewrap: Some(language_settings::RewrapBehavior::InComments),
|
||||
preferred_line_length: Some(40),
|
||||
..Default::default()
|
||||
},
|
||||
)])
|
||||
|
@ -5807,18 +5808,18 @@ async fn test_rewrap_block_comments(cx: &mut TestAppContext) {
|
|||
assert_rewrap(
|
||||
indoc! {"
|
||||
/*
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit purus, a ornare lacus gravida vitae.
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
*/
|
||||
/*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit purus, a ornare lacus gravida vitae. */
|
||||
/*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. */
|
||||
"},
|
||||
indoc! {"
|
||||
/*
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit
|
||||
* purus, a ornare lacus gravida vitae.
|
||||
*ˇ Lorem ipsum dolor sit amet,
|
||||
* consectetur adipiscing elit.
|
||||
*/
|
||||
/*
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit
|
||||
* purus, a ornare lacus gravida vitae.
|
||||
*ˇ Lorem ipsum dolor sit amet,
|
||||
* consectetur adipiscing elit.
|
||||
*/
|
||||
"},
|
||||
rust_lang.clone(),
|
||||
|
@ -5834,7 +5835,8 @@ async fn test_rewrap_block_comments(cx: &mut TestAppContext) {
|
|||
indoc! {"
|
||||
{}
|
||||
/*
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
*ˇ Lorem ipsum dolor sit amet,
|
||||
* consectetur adipiscing elit.
|
||||
*/
|
||||
"},
|
||||
rust_lang.clone(),
|
||||
|
@ -5852,13 +5854,16 @@ async fn test_rewrap_block_comments(cx: &mut TestAppContext) {
|
|||
"},
|
||||
indoc! {"
|
||||
/*
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
*ˇ Lorem ipsum dolor sit amet,
|
||||
* consectetur adipiscing elit.
|
||||
*/
|
||||
/*
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
*ˇ Lorem ipsum dolor sit amet,
|
||||
* consectetur adipiscing elit.
|
||||
*/
|
||||
/*
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
*ˇ Lorem ipsum dolor sit amet,
|
||||
* consectetur adipiscing elit.
|
||||
*/
|
||||
"},
|
||||
rust_lang.clone(),
|
||||
|
@ -5868,13 +5873,13 @@ async fn test_rewrap_block_comments(cx: &mut TestAppContext) {
|
|||
// multiline block comment with inline start/end delimiters
|
||||
assert_rewrap(
|
||||
indoc! {"
|
||||
/*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
* Vivamus mollis elit purus, a ornare lacus gravida vitae. */
|
||||
/*ˇ Lorem ipsum dolor sit amet,
|
||||
* consectetur adipiscing elit. */
|
||||
"},
|
||||
indoc! {"
|
||||
/*
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit
|
||||
* purus, a ornare lacus gravida vitae.
|
||||
*ˇ Lorem ipsum dolor sit amet,
|
||||
* consectetur adipiscing elit.
|
||||
*/
|
||||
"},
|
||||
rust_lang.clone(),
|
||||
|
@ -5885,17 +5890,17 @@ async fn test_rewrap_block_comments(cx: &mut TestAppContext) {
|
|||
assert_rewrap(
|
||||
indoc! {"
|
||||
/*
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit purus, a ornare lacus gravida vitae.
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
*
|
||||
* Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit purus, a ornare lacus gravida vitae.
|
||||
* Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
*/
|
||||
"},
|
||||
indoc! {"
|
||||
/*
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit
|
||||
* purus, a ornare lacus gravida vitae.
|
||||
*ˇ Lorem ipsum dolor sit amet,
|
||||
* consectetur adipiscing elit.
|
||||
*
|
||||
* Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit purus, a ornare lacus gravida vitae.
|
||||
* Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
*/
|
||||
"},
|
||||
rust_lang.clone(),
|
||||
|
@ -5905,19 +5910,19 @@ async fn test_rewrap_block_comments(cx: &mut TestAppContext) {
|
|||
// documentation comments
|
||||
assert_rewrap(
|
||||
indoc! {"
|
||||
/**ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit purus, a ornare lacus gravida vitae. */
|
||||
/**ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. */
|
||||
/**
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit purus, a ornare lacus gravida vitae.
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
*/
|
||||
"},
|
||||
indoc! {"
|
||||
/**
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit
|
||||
* purus, a ornare lacus gravida vitae.
|
||||
*ˇ Lorem ipsum dolor sit amet,
|
||||
* consectetur adipiscing elit.
|
||||
*/
|
||||
/**
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit
|
||||
* purus, a ornare lacus gravida vitae.
|
||||
*ˇ Lorem ipsum dolor sit amet,
|
||||
* consectetur adipiscing elit.
|
||||
*/
|
||||
"},
|
||||
rust_lang.clone(),
|
||||
|
@ -5928,22 +5933,22 @@ async fn test_rewrap_block_comments(cx: &mut TestAppContext) {
|
|||
assert_rewrap(
|
||||
indoc! {"
|
||||
/**
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit purus, a ornare lacus gravida vitae.
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
*/
|
||||
/*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit purus, a ornare lacus gravida vitae. */
|
||||
//ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit purus, a ornare lacus gravida vitae.
|
||||
/*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. */
|
||||
//ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
"},
|
||||
indoc! {"
|
||||
/**
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit
|
||||
* purus, a ornare lacus gravida vitae.
|
||||
*ˇ Lorem ipsum dolor sit amet,
|
||||
* consectetur adipiscing elit.
|
||||
*/
|
||||
/*
|
||||
*ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit
|
||||
* purus, a ornare lacus gravida vitae.
|
||||
*ˇ Lorem ipsum dolor sit amet,
|
||||
* consectetur adipiscing elit.
|
||||
*/
|
||||
//ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit
|
||||
// purus, a ornare lacus gravida vitae.
|
||||
//ˇ Lorem ipsum dolor sit amet,
|
||||
// consectetur adipiscing elit.
|
||||
"},
|
||||
rust_lang.clone(),
|
||||
&mut cx,
|
||||
|
@ -5953,7 +5958,7 @@ async fn test_rewrap_block_comments(cx: &mut TestAppContext) {
|
|||
assert_rewrap(
|
||||
indoc! {"
|
||||
/*
|
||||
//ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit purus, a ornare lacus gravida vitae.
|
||||
//ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
*/
|
||||
/*
|
||||
//ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. */
|
||||
|
@ -5961,14 +5966,16 @@ async fn test_rewrap_block_comments(cx: &mut TestAppContext) {
|
|||
"},
|
||||
indoc! {"
|
||||
/*
|
||||
//ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis elit
|
||||
// purus, a ornare lacus gravida vitae.
|
||||
//ˇ Lorem ipsum dolor sit amet,
|
||||
// consectetur adipiscing elit.
|
||||
*/
|
||||
/*
|
||||
* //ˇ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
* //ˇ Lorem ipsum dolor sit amet,
|
||||
* consectetur adipiscing elit.
|
||||
*/
|
||||
/*
|
||||
*ˇ Lorem ipsum dolor sit amet */ /* consectetur adipiscing elit.
|
||||
*ˇ Lorem ipsum dolor sit amet */ /*
|
||||
* consectetur adipiscing elit.
|
||||
*/
|
||||
"},
|
||||
rust_lang.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue