This repository has been archived by the owner on Aug 22, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 60
/
create_test.go
80 lines (79 loc) · 2.36 KB
/
create_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package memware
// func Test_Create(t *testing.T) {
// r := require.New(t)
//
// fs, err := New(here.Info{})
// f, err := fs.Create("/hello.txt")
// r.NoError(err)
// r.NotNil(f)
//
// fi, err := f.Stat()
// r.NoError(err)
//
// r.Equal("/hello.txt", fi.Name())
// r.Equal(os.FileMode(0666), fi.Mode())
// r.NotZero(fi.ModTime())
// }
//
// func Test_Create_Write(t *testing.T) {
// r := require.New(t)
//
// fs, err := New(here.Info{})
// f, err := fs.Create("/hello.txt")
// r.NoError(err)
// r.NotNil(f)
//
// fi, err := f.Stat()
// r.NoError(err)
// r.Zero(fi.Size())
//
// r.Equal("/hello.txt", fi.Name())
//
// mt := fi.ModTime()
// r.NotZero(mt)
//
// sz, err := io.Copy(f, strings.NewReader(radio))
// r.NoError(err)
// r.Equal(int64(1381), sz)
//
// r.NoError(f.Close())
// r.Equal(int64(1381), fi.Size())
// r.NotZero(fi.ModTime())
// r.NotEqual(mt, fi.ModTime())
// }
//
// const radio = `I was tuning in the shine on the late night dial
// Doing anything my radio advised
// With every one of those late night stations
// Playing songs bringing tears to my eyes
// I was seriously thinking about hiding the receiver
// When the switch broke 'cause it's old
// They're saying things that I can hardly believe
// They really think we're getting out of control
// Radio is a sound salvation
// Radio is cleaning up the nation
// They say you better listen to the voice of reason
// But they don't give you any choice 'cause they think that it's treason
// So you had better do as you are told
// You better listen to the radio
// I wanna bite the hand that feeds me
// I wanna bite that hand so badly
// I want to make them wish they'd never seen me
// Some of my friends sit around every evening
// And they worry about the times ahead
// But everybody else is overwhelmed by indifference
// And the promise of an early bed
// You either shut up or get cut up; they don't wanna hear about it
// It's only inches on the reel-to-reel
// And the radio is in the hands of such a lot of fools
// Tryin' to anesthetize the way that you feel
// Radio is a sound salvation
// Radio is cleaning up the nation
// They say you better listen to the voice of reason
// But they don't give you any choice 'cause they think that it's treason
// So you had better do as you are told
// You better listen to the radio
// Wonderful radio
// Marvelous radio
// Wonderful radio
// Radio, radio`