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() { func (p *TestPackage) Close() {
if p.ondisk { if p.ondisk {
err := os.RemoveAll(p.Path) 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 { if err != nil {
log.Printf("Error: %v\n", err) log.Printf("Error: %v\n", err)
} }
log.Print(f) log.Print(body)
}`, 1}, {` }`, 1}, {`
package main package main
@ -493,8 +493,7 @@ func main() {
fmt.Printf("Error: %v\n", err) fmt.Printf("Error: %v\n", err)
} }
body := make([]byte, 5) body := make([]byte, 5)
n1, err := f.Read(body) if _, err = f.Read(body); err != nil {
if err != nil {
fmt.Printf("Error: %v\n", err) fmt.Printf("Error: %v\n", err)
} }
fmt.Fprintf(w, "%s", body) fmt.Fprintf(w, "%s", body)