File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
package main
2
2
3
3
import (
4
+ "fmt"
4
5
"os"
5
6
6
7
"github.com/gopherdojo/dojo6/kadai2/en-ken/cli"
@@ -13,5 +14,8 @@ func main() {
13
14
NewImageFIle : func (path string ) (imgcnv.ImageFile , error ) { return imgcnv .NewImageFile (path ) },
14
15
}
15
16
16
- cli .Execute (os .Args )
17
+ err := cli .Execute (os .Args )
18
+ if err != nil {
19
+ fmt .Printf ("%v" , err )
20
+ }
17
21
}
Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ import (
7
7
)
8
8
9
9
func TestMain (m * testing.M ) {
10
- exec .Command ("go" , "build " , "-o" , "kadai1 " ).Run ()
10
+ exec .Command ("go" , "get " , "github.com/gopherdojo/dojo6/kadai2/en-ken/kadai2 " ).Run ()
11
11
m .Run ()
12
12
}
13
13
14
14
func TestMainSuccess (t * testing.T ) {
15
15
16
- cmdString := "./kadai1 ./testdata -input-ext .jpg -output-dir ./out -output-ext .png"
16
+ cmdString := "kadai2 ./testdata -input-ext .jpg -output-dir ./out -output-ext .png"
17
17
cmd := strings .Split (cmdString , " " )
18
18
err := exec .Command (cmd [0 ], cmd [1 :]... ).Run ()
19
19
if err != nil {
@@ -23,7 +23,7 @@ func TestMainSuccess(t *testing.T) {
23
23
24
24
func TestMainFailure (t * testing.T ) {
25
25
26
- cmdString := "./kadai1 "
26
+ cmdString := "kadai2 "
27
27
cmd := strings .Split (cmdString , " " )
28
28
err := exec .Command (cmd [0 ], cmd [1 :]... ).Run ()
29
29
if err == nil {
You can’t perform that action at this time.
0 commit comments