Skip to content

Commit

Permalink
test_runner: add reporters
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Apr 18, 2023
1 parent c1b8515 commit 9372c22
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
24 changes: 18 additions & 6 deletions patches/node/fix_libc_buffer_overflow_in_string_view_ctor.patch
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,28 @@ break in the next version of Xcode that's shipped and this Node.js too.
This should be upstreamed to ada.

diff --git a/deps/ada/ada.cpp b/deps/ada/ada.cpp
index 8b2cdd38ad0bb1e5757cdf5724c5a5917fc8e577..da5a04fa18f3268fc23558da63bb4837d9860d4f 100644
index 8b2cdd38ad0bb1e5757cdf5724c5a5917fc8e577..24ff623e3350df7205e1b4653b844ff5cd780a18 100644
--- a/deps/ada/ada.cpp
+++ b/deps/ada/ada.cpp
@@ -826,7 +826,8 @@ namespace ada::helpers {
@@ -822,13 +822,17 @@ namespace ada::helpers {

ada_really_inline void shorten_path(std::string& path, ada::scheme::type type) noexcept {
size_t first_delimiter = path.find_first_of('/', 1);
+ size_t len = path.length();
+

// Let path be url’s path.
// If url’s scheme is "file", path’s size is 1, and path[0] is a normalized Windows drive letter, then return.
if (type == ada::scheme::type::FILE && first_delimiter == std::string_view::npos) {
- if (type == ada::scheme::type::FILE && first_delimiter == std::string_view::npos) {
- if (checkers::is_normalized_windows_drive_letter(std::string_view(path.data() + 1, first_delimiter - 1))) {
- return;
- }
+ if (path.length() && type == ada::scheme::type::FILE &&
+ first_delimiter == std::string_view::npos) {
+ if (checkers::is_normalized_windows_drive_letter(
+ std::string_view(path.data() + 1, path.length() - 1))) {
return;
}
+ std::string_view(path.data() + 1, path.length() - 1))) {
+ return;
+ }
}

// Remove path’s last item, if any.
1 change: 1 addition & 0 deletions script/node-disabled-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"parallel/test-process-versions",
"parallel/test-repl",
"parallel/test-repl-underscore",
"parallel/test-runner-reporters",
"parallel/test-snapshot-api",
"parallel/test-snapshot-basic",
"parallel/test-snapshot-console",
Expand Down

0 comments on commit 9372c22

Please sign in to comment.