tweak output formatting
This commit is contained in:
6
main.go
6
main.go
@@ -27,6 +27,7 @@ func main() {
|
||||
|
||||
// Process command line arguments
|
||||
flag.StringVar(&inputJson, "input", "./tests.json", "Full path to input json test definition file")
|
||||
flag.Parse()
|
||||
|
||||
// Read the json input file
|
||||
if fileExists(inputJson) {
|
||||
@@ -51,6 +52,7 @@ func main() {
|
||||
}
|
||||
|
||||
RunTest(&testDefinitions.TestCases[i])
|
||||
fmt.Printf("\nRunning checks on output\n")
|
||||
success, err := CheckResults(&testDefinitions.TestCases[i])
|
||||
if err != nil {
|
||||
fmt.Printf("Error running test case : %s\n", err)
|
||||
@@ -60,11 +62,13 @@ func main() {
|
||||
fmt.Printf("Test result failed\n")
|
||||
os.Exit(1)
|
||||
} else {
|
||||
fmt.Printf("Tests successful\n")
|
||||
fmt.Printf("\nTest '%s' successful\n", testDefinitions.TestCases[i].Name)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fmt.Printf("\nCongratulations, all tests passed!\n\n")
|
||||
|
||||
// For debugging, just dump the output
|
||||
//fmt.Printf("%+v\n", testDefinitions)
|
||||
}
|
||||
|
Reference in New Issue
Block a user