common/compiler, common/docserver, jsre: fix tests on windows

This commit is contained in:
Felix Lange
2015-08-06 15:19:09 +01:00
parent eae1191904
commit 3832019964
4 changed files with 39 additions and 18 deletions

View File

@ -20,6 +20,7 @@ import (
"encoding/json"
"io/ioutil"
"os"
"path"
"testing"
"github.com/ethereum/go-ethereum/common"
@ -94,7 +95,7 @@ func TestSaveInfo(t *testing.T) {
if err != nil {
t.Errorf("%v", err)
}
filename := "/tmp/solctest.info.json"
filename := path.Join(os.TempDir(), "solctest.info.json")
os.Remove(filename)
cinfohash, err := SaveInfo(&cinfo, filename)
if err != nil {
@ -110,4 +111,4 @@ func TestSaveInfo(t *testing.T) {
if cinfohash != infohash {
t.Errorf("content hash for info is incorrect. expected %v, got %v", infohash.Hex(), cinfohash.Hex())
}
}
}