diff --git a/about_files.go b/about_files.go new file mode 100644 index 0000000..539d84f --- /dev/null +++ b/about_files.go @@ -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 +} diff --git a/setup_koans_test.go b/setup_koans_test.go index cec612f..328c5af 100644 --- a/setup_koans_test.go +++ b/setup_koans_test.go @@ -24,10 +24,10 @@ func TestKoans(t *testing.T) { //testControlFlow() //testEnumeration() //testAnonymousFunctions() - testVariadicFunctions() + //testVariadicFunctions() + testFiles() // TODO: ie, gameplan - //testFiles() //testInterfaces() //testMaps() //testStructs()