This commit is contained in:
jroam
2019-04-11 16:23:29 +08:00
parent 74558a500c
commit a60578c82c
2 changed files with 31 additions and 33 deletions

View File

@ -30,8 +30,6 @@ install:
script:
- cd g/os/gfile
- cd testfile/havefile1
- touch ttn1.txt ttm1.txt
- cd ../../
- GOARCH=386 go test -v ./...
- GOARCH=amd64 go test -v ./... -race -coverprofile=coverage.txt -covermode=atomic

View File

@ -272,37 +272,37 @@ func TestInfo(t *testing.T) {
}
func TestMove(t *testing.T) {
gtest.Case(t, func(){
var(
paths string ="./testfile/havefile1/ttn1.txt"
topath string ="./testfile/havefile1/ttn2.txt"
)
gtest.Assert(Move(paths,topath),nil)
})
}
func TestRename(t *testing.T){
gtest.Case(t, func(){
var(
paths string ="./testfile/havefile1/ttm1.txt"
topath string ="./testfile/havefile1/ttm2.txt"
)
gtest.Assert(Rename(paths,topath),nil)
gtest.Assert(IsFile(topath),true)
gtest.AssertNE(Rename("",""),nil)
})
}
//func TestMove(t *testing.T) {
// gtest.Case(t, func(){
// var(
// paths string ="./testfile/havefile1/ttn1.txt"
// topath string ="./testfile/havefile1/ttn2.txt"
// )
//
// gtest.Assert(Move(paths,topath),nil)
//
// })
//}
//
// func TestRename(t *testing.T){
// gtest.Case(t, func(){
// var(
//
// paths string ="./testfile/havefile1/ttm1.txt"
// topath string ="./testfile/havefile1/ttm2.txt"
//
// )
//
// gtest.Assert(Rename(paths,topath),nil)
// gtest.Assert(IsFile(topath),true)
//
// gtest.AssertNE(Rename("",""),nil)
//
//
// })
//
//
// }
func TestCopy(t *testing.T) {
gtest.Case(t, func(){