Commit 1576730
test,doc: clarify
Hopefully clarify the behaviour of `buffer.indexOf()` and
`buffer.includes()` for numbers in that they will be
truncated to uint8s.
Add tests for that behaviour.
Fixes: #7591
PR-URL: #7611
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>buf.indexOf(num) input range1 parent 2a84da5 commit 1576730Copy full SHA for 1576730
File tree
Expand file treeCollapse file tree
3 files changed
+36
-2
lines changedOpen diff view settings
Filter options
- doc/api
- test/parallel
Expand file treeCollapse file tree
3 files changed
+36
-2
lines changedOpen diff view settings
Collapse file
+4-2Lines changed: 4 additions & 2 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
973 | 973 | |
974 | 974 | |
975 | 975 | |
976 | | - |
| 976 | + |
| 977 | + |
977 | 978 | |
978 | 979 | |
979 | 980 | |
| ||
1012 | 1013 | |
1013 | 1014 | |
1014 | 1015 | |
1015 | | - |
| 1016 | + |
| 1017 | + |
1016 | 1018 | |
1017 | 1019 | |
1018 | 1020 | |
|
Collapse file
test/parallel/test-buffer-includes.js
Copy file name to clipboardExpand all lines: test/parallel/test-buffer-includes.js+16Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
256 | 256 | |
257 | 257 | |
258 | 258 | |
| 259 | + |
| 260 | + |
| 261 | + |
| 262 | + |
| 263 | + |
| 264 | + |
| 265 | + |
| 266 | + |
| 267 | + |
| 268 | + |
| 269 | + |
| 270 | + |
| 271 | + |
| 272 | + |
| 273 | + |
| 274 | + |
Collapse file
test/parallel/test-buffer-indexof.js
Copy file name to clipboardExpand all lines: test/parallel/test-buffer-indexof.js+16Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
448 | 448 | |
449 | 449 | |
450 | 450 | |
| 451 | + |
| 452 | + |
| 453 | + |
| 454 | + |
| 455 | + |
| 456 | + |
| 457 | + |
| 458 | + |
| 459 | + |
| 460 | + |
| 461 | + |
| 462 | + |
| 463 | + |
| 464 | + |
| 465 | + |
| 466 | + |
0 commit comments