@@ -41,7 +41,7 @@ func testErr(t *testing.T, err error, want ...string) {
4141
4242func TestMainGenerateOK (t * testing.T ) {
4343 if runtime .GOOS == "windows" {
44- t .Skip ("update -checks-doc doesn't support Windows" )
44+ t .Skip ("check -checks doesn't support Windows" )
4545 }
4646 root := t .TempDir ()
4747
@@ -52,7 +52,7 @@ func TestMainGenerateOK(t *testing.T) {
5252 in .Close ()
5353 tmp .Close ()
5454
55- if err := Main ([]string {"exe" , path }); err != nil {
55+ if err := Main ([]string {"exe" , "-fix" , path }); err != nil {
5656 t .Fatal (err )
5757 }
5858
@@ -65,20 +65,20 @@ func TestMainGenerateOK(t *testing.T) {
6565
6666func TestMainCheckOK (t * testing.T ) {
6767 if runtime .GOOS == "windows" {
68- t .Skip ("update -checks-doc doesn't support Windows" )
68+ t .Skip ("check -checks doesn't support Windows" )
6969 }
7070 path := filepath .FromSlash ("testdata/ok/minimal.out" )
71- if err := Main ([]string {"exe" , "-check" , path }); err != nil {
71+ if err := Main ([]string {"exe" , path }); err != nil {
7272 t .Fatal (err )
7373 }
7474}
7575
7676func TestMainCheckQuietOK (t * testing.T ) {
7777 if runtime .GOOS == "windows" {
78- t .Skip ("update -checks-doc doesn't support Windows" )
78+ t .Skip ("check -checks doesn't support Windows" )
7979 }
8080 path := filepath .FromSlash ("testdata/ok/minimal.out" )
81- if err := Main ([]string {"exe" , "-check" , "- quiet" , path }); err != nil {
81+ if err := Main ([]string {"exe" , "-quiet" , path }); err != nil {
8282 t .Fatal (err )
8383 }
8484}
@@ -91,14 +91,14 @@ func TestMainPrintHelp(t *testing.T) {
9191
9292func TestMainCheckError (t * testing.T ) {
9393 if runtime .GOOS == "windows" {
94- t .Skip ("update -checks-doc doesn't support Windows" )
94+ t .Skip ("check -checks doesn't support Windows" )
9595 }
9696 path := filepath .FromSlash ("testdata/ok/minimal.in" )
97- testErr (t , Main ([]string {"exe" , "-check" , path }), "checks document has some update" )
97+ testErr (t , Main ([]string {"exe" , path }), "checks document has some update" )
9898}
9999
100100func TestMainFileNotFound (t * testing.T ) {
101- testErr (t , Main ([]string {"exe" , "-check" , " this-file-does-not-exist.md" }), "could not read the document file" )
101+ testErr (t , Main ([]string {"exe" , "this-file-does-not-exist.md" }), "could not read the document file" )
102102}
103103
104104func TestMainTooManyArgs (t * testing.T ) {
@@ -109,16 +109,6 @@ func TestMainInvalidCheckFlag(t *testing.T) {
109109 testErr (t , Main ([]string {"exe" , "-c" , "foo.md" }), "flag provided but not defined" )
110110}
111111
112- func TestMainNoUpdate (t * testing.T ) {
113- if runtime .GOOS == "windows" {
114- t .Skip ("update-checks-doc doesn't support Windows" )
115- }
116- path := filepath .FromSlash ("testdata/ok/minimal.out" )
117- if err := Main ([]string {"exe" , path }); err != nil {
118- t .Fatal (err )
119- }
120- }
121-
122112func TestMainUpdateError (t * testing.T ) {
123113 path := filepath .FromSlash ("testdata/err/no_playground_link.md" )
124114 if err := Main ([]string {"exe" , path }); err == nil {
@@ -128,7 +118,7 @@ func TestMainUpdateError(t *testing.T) {
128118
129119func TestUpdateOK (t * testing.T ) {
130120 if runtime .GOOS == "windows" {
131- t .Skip ("update -checks-doc doesn't support Windows" )
121+ t .Skip ("check -checks doesn't support Windows" )
132122 }
133123
134124 dir := filepath .FromSlash ("testdata/ok" )
0 commit comments