1 /* Try to process this explicitly as UTF-8.
4 { dg-options "-finput-charset=UTF-8 -Winvalid-utf8 -fdiagnostics-format=sarif-file" } */
6 /* This comment intentionally contains non-UTF-8 bytes:
7 * €˜<unknown>€™ may be used uninitialized
11 { dg-final { verify-sarif-file } }
13 Verify that we captured the expected warnings.
15 { dg-final { scan-sarif-file "\"results\": \\\[" } }
16 { dg-final { scan-sarif-file "\"level\": \"warning\"" } }
17 { dg-final { scan-sarif-file "\"ruleId\": \"-Winvalid-utf8\"" } }
18 { dg-final { scan-sarif-file "\"message\": " } }
19 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <80>"} } }
20 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <98>"} } }
21 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <80>"} } }
22 { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <99>"} } }