diff --git a/crates/nu-command/src/strings/str_/expand.rs b/crates/nu-command/src/strings/str_/expand.rs index e6caa213b5..377ed8e757 100644 --- a/crates/nu-command/src/strings/str_/expand.rs +++ b/crates/nu-command/src/strings/str_/expand.rs @@ -376,6 +376,20 @@ mod tests { ); } + #[test] + fn test_numbers_proceeding_escape_char_not_ignored() { + assert_eq!( + str_expand("1\\\\{a,b}", Span::test_data(), Span::test_data()), + Value::list( + vec![ + Value::string(String::from("1\\a"), Span::test_data(),), + Value::string(String::from("1\\b"), Span::test_data(),) + ], + Span::test_data(), + ) + ); + } + #[test] fn test_examples() { use crate::test_examples;