From 8f9b198d48633484193c6fafd74e30b4a41b0f2a Mon Sep 17 00:00:00 2001 From: "A. Taha Baki" Date: Sun, 10 Nov 2024 16:00:42 +0300 Subject: [PATCH] upgrade bracoxide to v0.1.4 (fixes #14290) (#14296) I'm sorry I'm not following the PR template but this is a quick fix. Fixes #14290 --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- crates/nu-command/src/strings/str_/expand.rs | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e7707cea43..e946a058e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -472,9 +472,9 @@ dependencies = [ [[package]] name = "bracoxide" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ada7f35ca622a86a4d6c27be2633fc6c243ecc834859628fcce0681d8e76e1c8" +checksum = "fbc0bcb5424e8e1f29c21a00f2d222df5e8e9779732ff03f840315d8fbac708e" [[package]] name = "brotli" @@ -7108,7 +7108,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 8af6d422d7..1be660ccea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,7 +66,7 @@ alphanumeric-sort = "1.5" ansi-str = "0.8" anyhow = "1.0.82" base64 = "0.22.1" -bracoxide = "0.1.2" +bracoxide = "0.1.4" brotli = "6.0" byteorder = "1.5" bytes = "1" diff --git a/crates/nu-command/src/strings/str_/expand.rs b/crates/nu-command/src/strings/str_/expand.rs index 985c7fa57d..34d2feb7d8 100644 --- a/crates/nu-command/src/strings/str_/expand.rs +++ b/crates/nu-command/src/strings/str_/expand.rs @@ -307,6 +307,20 @@ fn str_expand(contents: &str, span: Span, value_span: Span) -> Value { mod tests { use super::*; + #[test] + fn test_outer_single_item() { + assert_eq!( + str_expand("{W{x,y}}", Span::test_data(), Span::test_data()), + Value::list( + vec![ + Value::string(String::from("Wx"), Span::test_data(),), + Value::string(String::from("Wy"), Span::test_data(),) + ], + Span::test_data(), + ) + ); + } + #[test] fn dots() { assert_eq!(