Skip to content

Commit

Permalink
syntax: add standalone tests for the latest fixes
Browse files Browse the repository at this point in the history
These are already tested as part of the new TestPrintMinifyNotBroken,
but having standalone regression test cases helps make sure we don't
break this again in the future.
  • Loading branch information
mvdan committed Jul 13, 2018
1 parent 8bc333b commit ff406f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion syntax/filetests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2671,7 +2671,7 @@ var fileTests = []testCase{
}),
},
{
Strs: []string{"$((a /= b))"},
Strs: []string{"$((a /= b))", "$((a/=b))"},
common: arithmExp(&BinaryArithm{
Op: QuoAssgn,
X: litWord("a"),
Expand Down
4 changes: 4 additions & 0 deletions syntax/printer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,10 @@ func TestPrintKeepPadding(t *testing.T) {
func TestPrintMinify(t *testing.T) {
var tests = [...]printCase{
samePrint("echo foo bar $a $(b)"),
{
"#comment",
"",
},
{
"foo #comment",
"foo",
Expand Down

0 comments on commit ff406f7

Please sign in to comment.