diff --git a/.hgignore b/.hgignore index 9281c5e1..c27ee1ef 100644 --- a/.hgignore +++ b/.hgignore @@ -1,4 +1,3 @@ -# Add no patterns to .hgignore except for files generated by 'go build'/'go test'. +# Add no patterns to .hgignore except for files generated by the build. syntax:glob last-change -*.got diff --git a/oracle/oracle_test.go b/oracle/oracle_test.go index cd63398b..9a0a7e46 100644 --- a/oracle/oracle_test.go +++ b/oracle/oracle_test.go @@ -234,6 +234,7 @@ func TestOracle(t *testing.T) { continue } defer gotfh.Close() + defer os.Remove(got) // Run the oracle on each query, redirecting its output // and error (if any) to the foo.got file. diff --git a/refactor/eg/eg_test.go b/refactor/eg/eg_test.go index 38174029..fa5bcc11 100644 --- a/refactor/eg/eg_test.go +++ b/refactor/eg/eg_test.go @@ -119,6 +119,7 @@ func Test(t *testing.T) { if err := eg.WriteAST(iprog.Fset, got, file); err != nil { t.Error(err) } + defer os.Remove(got) // Compare foo.got with foo.golden. var cmd *exec.Cmd