Cleanup test output

This commit is contained in:
Grant Murphy 2018-03-09 15:28:56 +10:00
parent 66aea5cd99
commit ff2b30ff5d
2 changed files with 5 additions and 4 deletions

View file

@ -129,6 +129,8 @@ func (p *TestPackage) CreateContext(filename string) *gas.Context {
func (p *TestPackage) Close() {
if p.ondisk {
err := os.RemoveAll(p.Path)
log.Println(err)
if err != nil {
log.Fatal(err)
}
}
}

View file

@ -473,7 +473,7 @@ body, err := ioutil.ReadFile(f)
if err != nil {
log.Printf("Error: %v\n", err)
}
log.Print(f)
log.Print(body)
}`, 1}, {`
package main
@ -493,8 +493,7 @@ func main() {
fmt.Printf("Error: %v\n", err)
}
body := make([]byte, 5)
n1, err := f.Read(body)
if err != nil {
if _, err = f.Read(body); err != nil {
fmt.Printf("Error: %v\n", err)
}
fmt.Fprintf(w, "%s", body)