files
This commit is contained in:
11
about_files.go
Normal file
11
about_files.go
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
package go_koans
|
||||||
|
|
||||||
|
import "io/ioutil"
|
||||||
|
import "strings"
|
||||||
|
|
||||||
|
func testFiles() {
|
||||||
|
filename := "about_files.go"
|
||||||
|
contents, _ := ioutil.ReadFile(filename)
|
||||||
|
lines := strings.Split(string(contents), "\n")
|
||||||
|
assert(lines[5] == __string__) // handling files is too trivial
|
||||||
|
}
|
||||||
@@ -24,10 +24,10 @@ func TestKoans(t *testing.T) {
|
|||||||
//testControlFlow()
|
//testControlFlow()
|
||||||
//testEnumeration()
|
//testEnumeration()
|
||||||
//testAnonymousFunctions()
|
//testAnonymousFunctions()
|
||||||
testVariadicFunctions()
|
//testVariadicFunctions()
|
||||||
|
testFiles()
|
||||||
|
|
||||||
// TODO: ie, gameplan
|
// TODO: ie, gameplan
|
||||||
//testFiles()
|
|
||||||
//testInterfaces()
|
//testInterfaces()
|
||||||
//testMaps()
|
//testMaps()
|
||||||
//testStructs()
|
//testStructs()
|
||||||
|
|||||||
Reference in New Issue
Block a user