diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-03-27 04:08:15 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-03-27 04:08:15 +0800 |
commit | 829240c3252d9da09c9000e42b0686425a313e8b (patch) | |
tree | 5b5fe5aeb443a8fd8a325743490b8fb416a903d3 /jsre | |
parent | 658204bafcba6332e979aee690dc5cff6e46fb42 (diff) | |
parent | 7577d1261403dbabdb30e21415d34b4e5da466ec (diff) | |
download | dexon-829240c3252d9da09c9000e42b0686425a313e8b.tar dexon-829240c3252d9da09c9000e42b0686425a313e8b.tar.gz dexon-829240c3252d9da09c9000e42b0686425a313e8b.tar.bz2 dexon-829240c3252d9da09c9000e42b0686425a313e8b.tar.lz dexon-829240c3252d9da09c9000e42b0686425a313e8b.tar.xz dexon-829240c3252d9da09c9000e42b0686425a313e8b.tar.zst dexon-829240c3252d9da09c9000e42b0686425a313e8b.zip |
Merge pull request #550 from ethersphere/frontier/cli-key
import/export accounts
Diffstat (limited to 'jsre')
-rw-r--r-- | jsre/jsre_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/jsre/jsre_test.go b/jsre/jsre_test.go index 8a771dae8..667ed4bdc 100644 --- a/jsre/jsre_test.go +++ b/jsre/jsre_test.go @@ -2,9 +2,9 @@ package jsre import ( "github.com/robertkrimen/otto" + "io/ioutil" + "os" "testing" - - "github.com/ethereum/go-ethereum/common" ) type testNativeObjectBinding struct { @@ -26,7 +26,7 @@ func (no *testNativeObjectBinding) TestMethod(call otto.FunctionCall) otto.Value func TestExec(t *testing.T) { jsre := New("/tmp") - common.WriteFile("/tmp/test.js", []byte(`msg = "testMsg"`)) + ioutil.WriteFile("/tmp/test.js", []byte(`msg = "testMsg"`), os.ModePerm) err := jsre.Exec("test.js") if err != nil { t.Errorf("expected no error, got %v", err) @@ -64,7 +64,7 @@ func TestBind(t *testing.T) { func TestLoadScript(t *testing.T) { jsre := New("/tmp") - common.WriteFile("/tmp/test.js", []byte(`msg = "testMsg"`)) + ioutil.WriteFile("/tmp/test.js", []byte(`msg = "testMsg"`), os.ModePerm) _, err := jsre.Run(`loadScript("test.js")`) if err != nil { t.Errorf("expected no error, got %v", err) |