You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
287 B
17 lines
287 B
3 years ago
|
package fs
|
||
|
|
||
|
import "testing"
|
||
|
|
||
|
func Test_GetFile(t *testing.T) {
|
||
|
filepath := "../testfiles/testfile.txt"
|
||
|
|
||
|
file, err := GetFile(filepath)
|
||
|
if err != nil {
|
||
|
t.Fatalf("GetFile error: %s", err)
|
||
|
}
|
||
|
|
||
|
if file.Name != "testfile.txt" {
|
||
|
t.Fatalf("GetFile error: filenames do not match")
|
||
|
}
|
||
|
}
|