Beispiel #1
0
func TestParse(t *testing.T) {
	rf := file.New()
	text := rf.Read("../includes/test")
	variables := BuildVariables(text)

	for k, v := range *variables {
		fmt.Printf("%v = /%v/\n", k, v)
	}
}
Beispiel #2
0
func TestLex(t *testing.T) {
	rf := file.New()
	text := rf.Read("../includes/test")

	// fmt.Print(text)

	l := lex(text)
	for {
		item, more := <-l.items
		if !more {
			break
		}
		fmt.Printf("item: %v\n", item)
	}
}
Beispiel #3
0
func main() {
	rf := file.New()
	text := rf.Read("test")

	fmt.Print(text)
}