Skip to content

Commit

Permalink
chore(core): reenable glob tests (#18320)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammisuli authored Jul 26, 2023
1 parent c599d2f commit eef0bd5
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions packages/nx/src/native/utils/glob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,21 +218,21 @@ mod test {

#[test]
fn should_handle_complex_patterns() {
// let glob_set =
// build_glob_set(&["dist/!(cache|cache2)/**/!(README|LICENSE).(txt|md)"]).unwrap();
//
// // matches
// assert!(glob_set.is_match("dist/nested/file.txt"));
// assert!(glob_set.is_match("dist/nested/file.md"));
// // no matches
// assert!(!glob_set.is_match("dist/file.txt"));
// assert!(!glob_set.is_match("dist/cache/nested/README.txt"));
// assert!(!glob_set.is_match("dist/nested/LICENSE.md"));
// assert!(!glob_set.is_match("dist/cache/file.txt"));
// assert!(!glob_set.is_match("dist/cache2/file.txt"));
// assert!(!glob_set.is_match("dist/cache2/README.txt"));
// assert!(!glob_set.is_match("dist/LICENSE.md"));
// assert!(!glob_set.is_match("dist/README.txt"));
let glob_set =
build_glob_set(&["dist/!(cache|cache2)/**/!(README|LICENSE).(txt|md)"]).unwrap();

// matches
assert!(glob_set.is_match("dist/nested/file.txt"));
assert!(glob_set.is_match("dist/nested/file.md"));
// no matches
assert!(!glob_set.is_match("dist/file.txt"));
assert!(!glob_set.is_match("dist/cache/nested/README.txt"));
assert!(!glob_set.is_match("dist/nested/LICENSE.md"));
assert!(!glob_set.is_match("dist/cache/file.txt"));
assert!(!glob_set.is_match("dist/cache2/file.txt"));
assert!(!glob_set.is_match("dist/cache2/README.txt"));
assert!(!glob_set.is_match("dist/LICENSE.md"));
assert!(!glob_set.is_match("dist/README.txt"));

let glob_set = build_glob_set(&["dist/*.(js|ts)"]).unwrap();
// matches
Expand Down

1 comment on commit eef0bd5

@vercel
Copy link

@vercel vercel bot commented on eef0bd5 Jul 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx.dev

Please sign in to comment.