(t *testing.T)
| 2992 | } |
| 2993 | |
| 2994 | func TestBytesLiteral_errors(t *testing.T) { |
| 2995 | // \u and \U escapes should not be allowed in bytes literals |
| 2996 | errorCases := []string{ |
| 2997 | `b'\u0041'`, |
| 2998 | `b"\U00000041"`, |
| 2999 | } |
| 3000 | |
| 3001 | for _, code := range errorCases { |
| 3002 | t.Run(code, func(t *testing.T) { |
| 3003 | _, err := expr.Compile(code) |
| 3004 | require.Error(t, err) |
| 3005 | }) |
| 3006 | } |
| 3007 | } |