1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 15:20:54 +00:00

fix bug of test case

This commit is contained in:
youngsterxyf 2016-01-27 12:26:37 +08:00
parent e549d0fd9c
commit 321bcc606a

View File

@ -8,9 +8,11 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"testing" "testing"
"path/filepath"
) )
const licenseFile = "./LICENSE" var currentWorkDir, _ = os.Getwd()
var licenseFile = filepath.Join(currentWorkDir, "LICENSE")
func testOpenFile(encoding string, content []byte, t *testing.T) { func testOpenFile(encoding string, content []byte, t *testing.T) {
fi, _ := os.Stat(licenseFile) fi, _ := os.Stat(licenseFile)