fix(key),test: simplify the input analysis code#568
Merged
muesli merged 1 commit intocharmbracelet:masterfrom Jun 15, 2023
Merged
fix(key),test: simplify the input analysis code#568muesli merged 1 commit intocharmbracelet:masterfrom
muesli merged 1 commit intocharmbracelet:masterfrom
Conversation
c7f520d to
012ddce
Compare
muesli
reviewed
Oct 21, 2022
5f79f56 to
ce2a006
Compare
This was referenced Oct 21, 2022
ce2a006 to
9e4b2b0
Compare
This was referenced Jan 7, 2023
Merged
Contributor
Author
|
@muesli this is ready again. |
muesli
reviewed
Apr 11, 2023
| if m, ok := v.(KeyMsg); ok && | ||
| m.String() != td.out[i].(KeyMsg).String() { | ||
| t.Fatalf(`expected a keymsg %q, got %q`, td.out[i].(KeyMsg), m) | ||
| // randTest defines the test input and expected output for a sequence |
Contributor
There was a problem hiding this comment.
Good enough for now, but I guess we could eventually replace the randomizer with a proper fuzzer?
Contributor
Author
There was a problem hiding this comment.
Yes that is reasonable. Do you want to do this right away? Is there something standard we can use?
Contributor
There was a problem hiding this comment.
Let's keep it as it is, the code looks and works fine for me. As soon as we bump Go to 1.18 we can start moving to the Go fuzzer that's part of the standard toolchain: https://go.dev/security/fuzz/
9e4b2b0 to
f775c66
Compare
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains only the input simplification part of #511.
cc @muesli