-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a few text-related generators #56
base: main
Are you sure you want to change the base?
Conversation
This all looks reasonable enough to me. Some suggestions:
|
Thanks for the contribution! |
(I do like the "shrink towards printable" goal you mentioned in #52; that is something we can write a test for.) |
rebased out the accidentally commited |
75a524e
to
515f8de
Compare
I reworked stuff a little and added tests. (They found issues of course 😃) Still need to have a short think of how to best test |
edc7c8a
to
1c71cf2
Compare
Marked this as WIP. Feel free to ping me when you think this is ready for review :) |
Based on my fumbling at #52 I added this to my project and thought if might be something you'd want to include.
The code points are taken from Hedgehog. I did consider adjusting the weights of
unicode
to skew more towards printable characters, but theres a lot of codepoints in unicde and I thought it's better to have hex escape codes than being biased too much towards ascii or sth.I'm not sure what an appropriate level of testing for code like this would be. I'd be happy to add some, but I think I need a little guidance on what to test.
This PR builds on #54 , if you're interested in merging this one but are concerned about
chooseAny
, let me know and I'll remove the dependency