Conversion of interp func into runtime func already worked, but added a test anyway to watch out for regressions. Fixes #941
20 lines
296 B
Go
20 lines
296 B
Go
package main
|
|
|
|
import "bufio"
|
|
|
|
func fakeSplitFunc(data []byte, atEOF bool) (advance int, token []byte, err error) {
|
|
return 7, nil, nil
|
|
}
|
|
|
|
func main() {
|
|
splitfunc := bufio.SplitFunc(fakeSplitFunc)
|
|
n, _, err := splitfunc(nil, true)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
println(n)
|
|
}
|
|
|
|
// Output:
|
|
// 7
|