Skip to content

Commit 9ced035

Browse files
committed
Asterisk is not legal in windows paths,
but metachar left brace is.
1 parent b5ce402 commit 9ced035

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • crates/nu-command/tests/commands

crates/nu-command/tests/commands/glob.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ pub fn create_file_at(full_path: impl AsRef<Path>) -> Result<(), std::io::Error>
133133
#[rstest]
134134
#[case(".", r#"'*z'"#, &["ablez", "baker", "charliez"], &["ablez", "charliez"], "simple glob")]
135135
#[case(".", r#"'qqq'"#, &["ablez", "baker", "charliez"], &[], "glob matches none")]
136-
#[case("foo/bar", r#"'*[*]*'"#, &[r#"foo/bar/ab*le"#, "foo/bar/baker", r#"foo/bar/cha*rlie"#], &[r#"foo/bar/ab*le"#, r#"foo/bar/cha*rlie"#], "glob has quoted metachars")]
136+
#[case("foo/bar", r#"'*[{]*'"#, &[r#"foo/bar/ab{le"#, "foo/bar/baker", r#"foo/bar/cha}rlie"#], &[r#"foo/bar/ab{le"#], "glob has quoted metachars")]
137137
#[case("foo/bar", r#"'../*'"#, &["foo/able", "foo/bar/baker", "foo/charlie"], &["foo/able", "foo/bar", "foo/charlie"], "glob matches files in parent")]
138138
#[case("foo", r#"'./{a,b}*'"#, &["foo/able", "foo/bar/baker", "foo/charlie"], &["foo/able", "foo/bar"], "glob with leading ./ matches peer files")]
139139
fn glob_files_in_parent(

0 commit comments

Comments
 (0)