diff --git a/crates/nu-command/tests/commands/match_.rs b/crates/nu-command/tests/commands/match_.rs index 23e4450d2b..5d41b3291a 100644 --- a/crates/nu-command/tests/commands/match_.rs +++ b/crates/nu-command/tests/commands/match_.rs @@ -140,6 +140,15 @@ fn match_constant_7() { assert_eq!(actual.out, "success"); } +#[test] +fn match_constant_8() { + let actual = + nu!(r#"match "foo" { r#'foo'# => { print "success" }, _ => { print "failure" } }"#); + // Make sure we don't see any of these values in the output + // As we do not auto-print loops anymore + assert_eq!(actual.out, "success"); +} + #[test] fn match_null() { let actual = nu!(r#"match null { null => { print "success"}, _ => { print "failure" }}"#); diff --git a/crates/nu-protocol/src/engine/pattern_match.rs b/crates/nu-protocol/src/engine/pattern_match.rs index 3284527cc6..32c34d22d3 100644 --- a/crates/nu-protocol/src/engine/pattern_match.rs +++ b/crates/nu-protocol/src/engine/pattern_match.rs @@ -128,7 +128,7 @@ impl Matcher for Pattern { false } } - Expr::String(x) => { + Expr::String(x) | Expr::RawString(x) => { if let Value::String { val, .. } = &value { x == val } else {