Another test and pithy README example
This commit is contained in:
parent
b7605c42b4
commit
51e9386e6b
14
README.md
14
README.md
@ -1 +1,15 @@
|
||||
[](https://pkg.go.dev/github.com/tardisx/haiku-detector)
|
||||
|
||||
|
||||
import "github.com/tardisx/haiku-detector"
|
||||
|
||||
haiku := haiku.Find("haiku can be found wherever you are looking with help of some code")
|
||||
|
||||
if len(haiku) > 0 {
|
||||
println(haiku[0].String())
|
||||
}
|
||||
|
||||
// haiku can be found
|
||||
// wherever you are looking
|
||||
// with help of some code
|
||||
|
||||
|
@ -117,6 +117,14 @@ Memory held tight, swept away in quiet dusk, Go frees what I leave.`
|
||||
another waits in silence,
|
||||
they meet, work is done`, out[2].String())
|
||||
}
|
||||
|
||||
h := Find("haiku can be found wherever you are looking with help of some code")
|
||||
if assert.Len(t, h, 1) {
|
||||
assert.Equal(t, `haiku can be found
|
||||
wherever you are looking
|
||||
with help of some code`, h[0].String())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func FuzzHaikuFromSentence(f *testing.F) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user