Skip to content
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

Ideas for additional coverage for base64 #4031

Open
Ms2ger opened this issue Mar 27, 2024 · 0 comments
Open

Ideas for additional coverage for base64 #4031

Ms2ger opened this issue Mar 27, 2024 · 0 comments

Comments

@Ms2ger
Copy link
Contributor

Ms2ger commented Mar 27, 2024

Ideas for additional coverage:

  • Whitespace between and after the padding character =, e.g. Uint8Array.fromBase64("Zg= =") and Uint8Array.fromBase64("Zg= = ").
  • Uint8Array.prototype.setFrom{Base64,Hex} doesn't modify the typed array when the input string is invalid.
  • Typed array is backed by a SharedArrayBuffer.
  • lastChunkHandling option is present, but set to undefined, e.g. the options object is {lastChunkHandling: undefined}.
  • lastChunkHandling option is an invalid string value, e.g. the options object is {lastChunkHandling: "bad"}.
  • alphabet option is present, but set to undefined, e.g. the options object is {alphabet: undefined}.
  • alphabet and lastChunkHandling options are read in the correct order.
  • Extra bits with three element trailing chunk and strict chunk handling, e.g. Uint8Array.fromBase64("ZZZ=", {lastChunkHandling: "strict"}). (The two element chunk case is already covered.)

Originally posted by @anba in #3994 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant