func TestGet3(t *testing.T) {
	g := FromString("a b c")
	n := g.Get("a").Get("b")
	m := g.Get("a.b")
	t1, _ := g.GetString("a.b")
	t2 := n.String()
	s := n.Text()
	if s != "c" {
		t.Error("Get case 1", n.Text())
	}
	s = m.Text()
	if s != "c" {
		t.Error("Get case 2", m.Text())
	}
	if t1 != "c" {
		t.Error("Get eqv", m.Text())
	}
	if t1 != t2 {
		t.Error("Get eqv", m.Text())
	}
	g = FromString("a\n c\n b")
	n = g.Get("a").Get("[0]")
	m = g.Get("a[0]")
	s = n.Text()
	if s != "c" {
		t.Error("Get case 3", n.Text())
	}
	s = m.Text()
	if s != "c" {
		t.Error("Get case 4", m.Text())
	}
}
Check correct get chaining
package ogdl
import (
	"fmt"
	"math"
	"os"
	"reflect"
	"testing"
)
func TestJson1(t *testing.T) {
	g := FromString("a\n 1\nb\n c")
	b := g.JSON()
	fmt.Println(string(b))
}
func TestJson2(t *testing.T) {
	g := FromString("a\n b\n  x 1\n  y2\n c z 3")
	b := g.JSON()
	fmt.Println(string(b))
}
func TestUnread(t *testing.T) {
	p := NewBytesParser([]byte("ab"))
	c, _ := p.Byte()
	if c != 'a' {
		t.Fatal("read failed: a")
	}
	p.UnreadByte()
	c, _ = p.Byte()
	if c != 'a' {
		t.Fatal("Unread failed: a")
	}
	c, _ = p.Byte()
	if c != 'b' {
		t.Fatal("read failed: b")
	}
	c, _ = p.Byte()
	if c != 0 {
		t.Fatal("read failed: EOS")
	}
	p.UnreadByte()
	p.UnreadByte()
	c, _ = p.Byte()
	if c != 'b' {
		t.Fatal("Unread failed: b")
	}
	c, _ = p.Byte()
	if c != 0 {
		t.Fatal("read failed: EOS")
	}
	c, _ = p.Byte()
	if c != 0 {
		t.Fatal("read failed: EOS")
	}
}
func TestChars(t *testing.T) {
	if !IsSpaceChar(' ') {
		t.Error("Error in character class")
	}
	if !IsBreakChar('\n') {
		t.Error("Error in character class")
	}
	if !IsBreakChar('\r') {
		t.Error("Error in character class")
	}
	if !IsSpaceChar('\t') {
		t.Error("Error in character class")
	}
	if IsSpaceChar('a') {
		t.Error("Error in character class")
	}
	if !IsTextChar('(') {
		t.Error("Error in character class")
	}
	if IsTextChar('\t') {
		t.Error("Error in character class")
	}
	if !IsTextChar('_') {
		t.Error("Error in character class")
	}
	if !IsDigit('1') {
		t.Error("Error in character class")
	}
	if IsDigit('x') {
		t.Error("Error in character class")
	}
	if IsDigit(-1) {
		t.Error("Error in character class")
	}
	if IsLetter('1') {
		t.Error("Error in character class")
	}
	if IsLetter(-1) {
		t.Error("Error in character class")
	}
	if !IsEndChar(0) {
		t.Error("Error in character class")
	}
	if IsEndChar('\t') {
		t.Error("Error in character class")
	}
	if !isOperatorChar('>') {
		t.Error("Error in character class")
	}
	if isTemplateTextChar('$') {
		t.Error("Error in character class")
	}
	if !isTemplateTextChar(' ') {
		t.Error("Error in character class")
	}
	if isTokenChar('$') {
		t.Error("Error in character class")
	}
}
func TestGet2(t *testing.T) {
	g := FromString("a b")
	n := g.Get("a")
	s := n.Text()
	if s != "b" {
		t.Error("ogdl.Get")
	}
	g = New(nil)
	g.Add("a").Add("b")
	n = g.Get("a")
	s = n.Text()
	if s != "b" {
		t.Error("ogdl.Get")
	}
	g = New("a")
	g.Add("b")
	n = g.Get("a")
	s = n.Text()
	if s != "" {
		t.Error("ogdl.Get (root node)")
	}
	g = FromString("a\n b\n c")
	n = g.Get("a")
	s = n.Text()
	if s != "b\nc" {
		t.Error("ogdl.Get (root node)")
	}
	g = FromString("a\n b\n c")
	n = g.Get("a[0]")
	s = n.Text()
	if s != "b" {
		t.Error("ogdl.Get", s)
	}
	g = FromString("a b")
	n = g.Get("a[0]")
	s = n.Text()
	if s != "b" {
		t.Error("ogdl.Get")
	}
	g = FromString("a\nb")
	n = g.Get("[0]")
	s = n.Text()
	if s != "a" {
		t.Error("Get index", n.Text())
	}
}