@@ -41,7 +41,7 @@ func testErr(t *testing.T, err error, want ...string) {
41
41
42
42
func TestMainGenerateOK (t * testing.T ) {
43
43
if runtime .GOOS == "windows" {
44
- t .Skip ("update -checks-doc doesn't support Windows" )
44
+ t .Skip ("check -checks doesn't support Windows" )
45
45
}
46
46
root := t .TempDir ()
47
47
@@ -52,7 +52,7 @@ func TestMainGenerateOK(t *testing.T) {
52
52
in .Close ()
53
53
tmp .Close ()
54
54
55
- if err := Main ([]string {"exe" , path }); err != nil {
55
+ if err := Main ([]string {"exe" , "-fix" , path }); err != nil {
56
56
t .Fatal (err )
57
57
}
58
58
@@ -65,20 +65,20 @@ func TestMainGenerateOK(t *testing.T) {
65
65
66
66
func TestMainCheckOK (t * testing.T ) {
67
67
if runtime .GOOS == "windows" {
68
- t .Skip ("update -checks-doc doesn't support Windows" )
68
+ t .Skip ("check -checks doesn't support Windows" )
69
69
}
70
70
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 {
72
72
t .Fatal (err )
73
73
}
74
74
}
75
75
76
76
func TestMainCheckQuietOK (t * testing.T ) {
77
77
if runtime .GOOS == "windows" {
78
- t .Skip ("update -checks-doc doesn't support Windows" )
78
+ t .Skip ("check -checks doesn't support Windows" )
79
79
}
80
80
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 {
82
82
t .Fatal (err )
83
83
}
84
84
}
@@ -91,14 +91,14 @@ func TestMainPrintHelp(t *testing.T) {
91
91
92
92
func TestMainCheckError (t * testing.T ) {
93
93
if runtime .GOOS == "windows" {
94
- t .Skip ("update -checks-doc doesn't support Windows" )
94
+ t .Skip ("check -checks doesn't support Windows" )
95
95
}
96
96
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" )
98
98
}
99
99
100
100
func 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" )
102
102
}
103
103
104
104
func TestMainTooManyArgs (t * testing.T ) {
@@ -109,16 +109,6 @@ func TestMainInvalidCheckFlag(t *testing.T) {
109
109
testErr (t , Main ([]string {"exe" , "-c" , "foo.md" }), "flag provided but not defined" )
110
110
}
111
111
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
-
122
112
func TestMainUpdateError (t * testing.T ) {
123
113
path := filepath .FromSlash ("testdata/err/no_playground_link.md" )
124
114
if err := Main ([]string {"exe" , path }); err == nil {
@@ -128,7 +118,7 @@ func TestMainUpdateError(t *testing.T) {
128
118
129
119
func TestUpdateOK (t * testing.T ) {
130
120
if runtime .GOOS == "windows" {
131
- t .Skip ("update -checks-doc doesn't support Windows" )
121
+ t .Skip ("check -checks doesn't support Windows" )
132
122
}
133
123
134
124
dir := filepath .FromSlash ("testdata/ok" )
0 commit comments