Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
test: fix comment align to satisfy gofmt (#402)
Browse files Browse the repository at this point in the history
gofmt regression strategy changes in different go release version. In
this case, go version under 1.11.x will re-format one line code while
go version 1.11.x does nothing. Similar issue occurs in
golang/go#25161. So we change some comment position
  • Loading branch information
amyangfei committed Nov 2, 2018
1 parent e0d218c commit 0840f6b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions syncer/ast_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ func (s *testSyncerSuite) testFailedCases(c *C) {

// cases parse failed and should be supported in the near future
// {"ALTER TABLE bar ENABLE KEYS, DISABLE KEYS", []string{"ALTER TABLE `bar` ENABLE KEYS", "ALTER TABLE `bar` DISABLE KEYS"}, false},
{"alter table bar ORDER BY id1, id2", []string{"alter table bar ORDER BY id1, id2"}, true}, // tidb not support ORDER BY.
{"alter table bar add index (`name`), add FOREIGN KEY (product_category, product_id) REFERENCES product(category, id) ON UPDATE CASCADE ON DELETE RESTRICT", []string{"alter table bar add index (`name`), add FOREIGN KEY (product_category, product_id) REFERENCES product(category, id) ON UPDATE CASCADE ON DELETE RESTRICT"}, true}, // tidb not support ON UPDATE CASCADE ON DELETE RESTRICT

// tidb not support ORDER BY.
{"alter table bar ORDER BY id1, id2", []string{"alter table bar ORDER BY id1, id2"}, true},
// tidb not support ON UPDATE CASCADE ON DELETE RESTRICT
{"alter table bar add index (`name`), add FOREIGN KEY (product_category, product_id) REFERENCES product(category, id) ON UPDATE CASCADE ON DELETE RESTRICT", []string{"alter table bar add index (`name`), add FOREIGN KEY (product_category, product_id) REFERENCES product(category, id) ON UPDATE CASCADE ON DELETE RESTRICT"}, true},
}

s.run(c, tests)
Expand Down

0 comments on commit 0840f6b

Please sign in to comment.