Skip to content

Commit

Permalink
add test to evaluate delete_hanging_comma fn
Browse files Browse the repository at this point in the history
  • Loading branch information
varshith257 committed Jul 11, 2024
1 parent a377622 commit 4a4fb7d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions crates/core/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6330,6 +6330,41 @@ fn inline_list_length() {
.unwrap();
}

#[test]
fn test_delete_hanging_comma() {
run_test_expected(TestArgExpected {
pattern: r#"
|language python
|
|`TaskMetadata($args)` => `TaskMetadata($args)`
|"#
.trim_margin()
.unwrap(),
source: r#"
|TaskMetadata(
| name="TestTask",
| description="This is a test task.",
| type="TestType",
| ,
| reference="https://example.com/test",
|)
|"#
.trim_margin()
.unwrap(),
expected: r#"
|TaskMetadata(
| name="TestTask",
| description="This is a test task.",
| type="TestType",
| reference="https://example.com/test",
|)
|"#
.trim_margin()
.unwrap(),
})
.unwrap();
}

#[test]
fn string_length() {
run_test_expected({
Expand Down

0 comments on commit 4a4fb7d

Please sign in to comment.