diff options
| author | Shulhan <ms@kilabit.info> | 2024-04-17 23:31:39 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-04-17 23:31:39 +0700 |
| commit | a6629b6a1f40616dbf3e5f78c76d601f3b89127a (patch) | |
| tree | 990a1380feb7294627b814e3385d55855ae1a6f1 /client_test.go | |
| parent | c4cf5cfcaa570069f4f64deff26b390436e2e1c3 (diff) | |
| download | kbbi-a6629b6a1f40616dbf3e5f78c76d601f3b89127a.tar.xz | |
all: rename the module and package to "kbbi"
Since this module is connecting to KBBI server directly, the module and
package name now reflect that, hence we rename them to kbbi.
Another reason is we have an internal module named kamusku, in another
repository.
Diffstat (limited to 'client_test.go')
| -rw-r--r-- | client_test.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/client_test.go b/client_test.go new file mode 100644 index 0000000..fa9e3c7 --- /dev/null +++ b/client_test.go @@ -0,0 +1,28 @@ +// SPDX-FileCopyrightText: 2020 M. Shulhan <ms@kilabit.info> +// SPDX-License-Identifier: GPL-3.0-or-later + +package kbbi + +import ( + "os" + "testing" +) + +func TestClient_parseHTMLKataDasar(t *testing.T) { + htmlBody, err := os.ReadFile(`testdata/kbbi_dasar.html`) + if err != nil { + t.Fatal(err) + } + + cl, err := NewClient() + if err != nil { + t.Fatal(err) + } + + got, err := cl.parseHTMLRootWords(htmlBody) + if err != nil { + t.Fatal(err) + } + + t.Logf("Root words: %v", got) +} |
