Skip to content

Commit

Permalink
minor: promote test (#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Flash authored Dec 2, 2024
1 parent 5aba6b4 commit 28bfce6
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions crates/moon/tests/test_cases/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3983,6 +3983,7 @@ fn test_moon_fmt() {
check(
read(dir.join("lib").join("hello.mbt")),
expect![[r#"
///|
pub fn hello() -> String {
"Hello, world!"
}
Expand All @@ -3991,6 +3992,7 @@ fn test_moon_fmt() {
check(
read(dir.join("main").join("main.mbt")),
expect![[r#"
///|
fn main {
println(@lib.hello())
}
Expand Down Expand Up @@ -4031,6 +4033,7 @@ fn test_moon_fmt_002() {
.join("hello.mbt"),
),
expect![[r#"
///|
pub fn hello() -> String {
"Hello, world!"
}
Expand All @@ -4046,6 +4049,7 @@ fn test_moon_fmt_002() {
.join("main.mbt"),
),
expect![[r#"
///|
fn main {
println(@lib.hello())
}
Expand Down Expand Up @@ -7220,10 +7224,11 @@ fn test_moonfmt() {
check(
&out,
expect![[r#"
pub fn hello() -> String {
"Hello, world!"
}
"#]],
///|
pub fn hello() -> String {
"Hello, world!"
}
"#]],
);

check(
Expand All @@ -7240,6 +7245,7 @@ fn test_moonfmt() {
check(
read(dir.join("src/lib/hello.mbt")),
expect![[r#"
///|
pub fn hello() -> String {
"Hello, world!"
}
Expand All @@ -7261,18 +7267,20 @@ fn test_moonfmt() {
check(
read(dir.join("src/lib/hello.mbt")),
expect![[r#"
pub fn hello() -> String {
"Hello, world!"
}
"#]],
///|
pub fn hello() -> String {
"Hello, world!"
}
"#]],
);
check(
read(dir.join("src/lib/hello.txt")),
expect![[r#"
pub fn hello() -> String {
"Hello, world!"
}
"#]],
///|
pub fn hello() -> String {
"Hello, world!"
}
"#]],
);
}

Expand Down

0 comments on commit 28bfce6

Please sign in to comment.