diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-06-22 14:23:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-22 14:23:42 +0200 |
commit | 86354a29a40fb97e334f951428239ab8e171e2dd (patch) | |
tree | 2f0d8cc2680aa4ccbaf865b427976b3f810b6920 /deno_dir_test.go | |
parent | ef9dc2464e10510bdcc4be9eae431e3dcf7f7999 (diff) |
Delete go implementation (#276)
The go prototype will remain at https://github.com/ry/deno/tree/golang
Diffstat (limited to 'deno_dir_test.go')
-rw-r--r-- | deno_dir_test.go | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/deno_dir_test.go b/deno_dir_test.go deleted file mode 100644 index 2c1bfb1e2..000000000 --- a/deno_dir_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2018 Ryan Dahl <ry@tinyclouds.org> -// All rights reserved. MIT License. -package deno - -import ( - "io/ioutil" - "testing" -) - -func SetCacheDirForTest(prefix string) { - dir, err := ioutil.TempDir("", prefix) - check(err) - CacheDir = dir -} - -func TestLoadOutputCodeCache(t *testing.T) { - SetCacheDirForTest("TestLoadOutputCodeCache") - - filename := "Hello.ts" - sourceCodeBuf := []byte("1+2") - - cacheFn := CacheFileName(filename, sourceCodeBuf) - - outputCode, err := LoadOutputCodeCache(filename, sourceCodeBuf) - if err != nil { - t.Fatalf(err.Error()) - } - if outputCode != "" { - t.Fatalf("Expected empty outputCode but got <<%s>>", outputCode) - } - - // Now let's write to the cache file - err = ioutil.WriteFile(cacheFn, []byte("blah"), 0700) - if err != nil { - t.Fatalf(err.Error()) - } - - // Try it again. - outputCode, err = LoadOutputCodeCache(filename, sourceCodeBuf) - if err != nil { - t.Fatalf(err.Error()) - } - if outputCode != "blah" { - t.Fatalf("Bad outputCode but got <<%s>>", outputCode) - } -} |