diff options
Diffstat (limited to 'client_test.go')
| -rw-r--r-- | client_test.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/client_test.go b/client_test.go new file mode 100644 index 0000000..9b4e0a6 --- /dev/null +++ b/client_test.go @@ -0,0 +1,26 @@ +// Copyright 2020, Shulhan <m.shulhan@gmail.com>. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package kbbi + +import ( + "io/ioutil" + "testing" +) + +func TestClient_parseHTMLKataDasar(t *testing.T) { + htmlBody, err := ioutil.ReadFile("testdata/kbbi_dasar.html") + if err != nil { + t.Fatal(err) + } + + cl := NewClient() + + got, err := cl.parseHTMLKataDasar(htmlBody) + if err != nil { + t.Fatal(err) + } + + t.Logf("Kata dasar: %v", got) +} |
