Skip to content

Commit

Permalink
add integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
braydonk committed May 3, 2024
1 parent f51e552 commit 0da2a78
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 0 deletions.
16 changes: 16 additions & 0 deletions integrationtest/command/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,19 @@ func TestLineOutput(t *testing.T) {
IsError: true,
}.Run(t)
}

func TestDry(t *testing.T) {
TestCase{
Dir: "dry",
Command: yamlfmtWithArgs("-dry ."),
Update: *updateFlag,
}.Run(t)
}

func TestDryQuiet(t *testing.T) {
TestCase{
Dir: "dry_quiet",
Command: yamlfmtWithArgs("-dry -quiet ."),
Update: *updateFlag,
}.Run(t)
}
1 change: 1 addition & 0 deletions integrationtest/command/testdata/dry/after/a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a: 1
1 change: 1 addition & 0 deletions integrationtest/command/testdata/dry/before/a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a: 1
Empty file.
1 change: 1 addition & 0 deletions integrationtest/command/testdata/dry/stdout/stdout.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No files will be changed.
1 change: 1 addition & 0 deletions integrationtest/command/testdata/dry_quiet/after/a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a: 1
1 change: 1 addition & 0 deletions integrationtest/command/testdata/dry_quiet/before/a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a: 1
Empty file.
Empty file.

0 comments on commit 0da2a78

Please sign in to comment.