fix: correct escaping in test regex (#10138)

Fixes regex escaping.  Spotted during a code read.
This commit is contained in:
Spike Curtis
2023-10-10 08:42:39 +04:00
committed by GitHub
parent 9c098b218f
commit b039dc6989

View File

@ -356,7 +356,7 @@ func TestAgent_Session_TTY_MOTD(t *testing.T) {
Enabled: true, Enabled: true,
Message: "\n\n\n\n\n\nbanner\n\n\n\n\n\n", Message: "\n\n\n\n\n\nbanner\n\n\n\n\n\n",
}, },
expectedRe: regexp.MustCompile("([^\n\r]|^)banner\r\n\r\n[^\r\n]"), expectedRe: regexp.MustCompile(`([^\n\r]|^)banner\r\n\r\n[^\r\n]`),
}, },
} }