mirror of
https://github.com/PuerkitoBio/goquery
synced 2025-11-03 02:23:48 +08:00
add Text() with tests.
This commit is contained in:
11
type_test.go
11
type_test.go
@@ -28,6 +28,17 @@ func EnsureDocLoaded() {
|
||||
}
|
||||
}
|
||||
|
||||
func printNode(n *html.Node, t *testing.T) {
|
||||
t.Logf("Type: %v, Data: %v\n", n.Type, n.Data)
|
||||
for _, c := range n.Child {
|
||||
printNode(c, t)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPrintAll(t *testing.T) {
|
||||
//printNode(Doc().Root, t)
|
||||
}
|
||||
|
||||
func TestNewDocument(t *testing.T) {
|
||||
if f, e := os.Open("./testdata/page.html"); e != nil {
|
||||
t.Error(e.Error())
|
||||
|
||||
Reference in New Issue
Block a user