@@ -18,42 +18,42 @@ func TestFSStorage(t *testing.T) {
1818 }
1919 defer os .RemoveAll (root )
2020
21- err = fs .Put ("foo .txt" , bytes .NewBufferString ("Hello, World!" ))
21+ err = fs .Put ("test .txt" , bytes .NewBufferString ("Hello World!" ))
2222 if err != nil {
2323 t .Fatal (err )
2424 }
2525
26- err = fs .Put ("foo/bar .txt" , bytes .NewBufferString ("Hello, World!" ))
26+ err = fs .Put ("hello/world .txt" , bytes .NewBufferString ("Hello World!" ))
2727 if err != nil {
2828 t .Fatal (err )
2929 }
3030
31- fi , err := fs .Stat ("foo .txt" )
31+ fi , err := fs .Stat ("test .txt" )
3232 if err != nil {
3333 t .Fatal (err )
3434 }
3535
36- if fi .Size () != 13 {
37- t .Fatalf ("invalid file size(%d), shoud be 13 " , fi .Size ())
36+ if fi .Size () != 12 {
37+ t .Fatalf ("invalid file size(%d), shoud be 12 " , fi .Size ())
3838 }
3939
40- f , fi , err := fs .Get ("foo .txt" )
40+ f , fi , err := fs .Get ("test .txt" )
4141 if err != nil {
4242 t .Fatal (err )
4343 }
4444 defer f .Close ()
4545
46- if fi .Size () != 13 {
47- t .Fatalf ("invalid file size(%d), shoud be 13 " , fi .Size ())
46+ if fi .Size () != 12 {
47+ t .Fatalf ("invalid file size(%d), shoud be 12 " , fi .Size ())
4848 }
4949
5050 data , err := io .ReadAll (f )
5151 if err != nil {
5252 t .Fatal (err )
5353 }
5454
55- if string (data ) != "Hello, World!" {
56- t .Fatalf ("invalid file content('%s'), shoud be 'Hello, World!'" , string (data ))
55+ if string (data ) != "Hello World!" {
56+ t .Fatalf ("invalid file content('%s'), shoud be 'Hello World!'" , string (data ))
5757 }
5858
5959 keys , err := fs .List ("" )
@@ -65,7 +65,7 @@ func TestFSStorage(t *testing.T) {
6565 t .Fatalf ("invalid keys count(%d), shoud be 2" , len (keys ))
6666 }
6767
68- keys , err = fs .List ("foo /" )
68+ keys , err = fs .List ("hello /" )
6969 if err != nil {
7070 t .Fatal (err )
7171 }
@@ -74,26 +74,26 @@ func TestFSStorage(t *testing.T) {
7474 t .Fatalf ("invalid keys count(%d), shoud be 1" , len (keys ))
7575 }
7676
77- if keys [0 ] != "foo/bar .txt" {
78- t .Fatalf ("invalid key('%s'), shoud be 'foo/bar .txt'" , keys [0 ])
77+ if keys [0 ] != "hello/world .txt" {
78+ t .Fatalf ("invalid key('%s'), shoud be 'hello/world .txt'" , keys [0 ])
7979 }
8080
81- err = fs .Delete ("foo .txt" )
81+ err = fs .Delete ("test .txt" )
8282 if err != nil {
8383 t .Fatal (err )
8484 }
8585
86- _ , err = fs .Stat ("foo .txt" )
86+ _ , err = fs .Stat ("test .txt" )
8787 if err != ErrNotFound {
8888 t .Fatalf ("File should be not existent" )
8989 }
9090
91- _ , _ , err = fs .Get ("foo .txt" )
91+ _ , _ , err = fs .Get ("test .txt" )
9292 if err != ErrNotFound {
9393 t .Fatalf ("File should be not existent" )
9494 }
9595
96- deletedKeys , err := fs .DeleteAll ("foo /" )
96+ deletedKeys , err := fs .DeleteAll ("hello /" )
9797 if err != nil {
9898 t .Fatal (err )
9999 }
@@ -102,8 +102,8 @@ func TestFSStorage(t *testing.T) {
102102 t .Fatalf ("invalid deleted keys count(%d), shoud be 1" , len (deletedKeys ))
103103 }
104104
105- if deletedKeys [0 ] != "foo/bar .txt" {
106- t .Fatalf ("invalid deleted key('%s'), shoud be 'foo/bar .txt'" , deletedKeys [0 ])
105+ if deletedKeys [0 ] != "hello/world .txt" {
106+ t .Fatalf ("invalid deleted key('%s'), shoud be 'hello/world .txt'" , deletedKeys [0 ])
107107 }
108108
109109 keys , err = fs .List ("" )
0 commit comments