aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/diagnostic-format-sarif-file-pr111700.c
blob: 06605accf6e02e0ce98e14f1848947ffde7c931b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* { dg-do compile } */
/* { dg-options "-fdiagnostics-format=sarif-file" } */

# 0 "this-file-does-not-exist.c"
#warning message

/* Verify that some JSON was written to a file with the expected name.  */
/* { dg-final { verify-sarif-file } } */

/* ...and that it at least includes the warning
       { dg-final { scan-sarif-file "\"message\": " } }
         { dg-final { scan-sarif-file "\"text\": \"#warning message" } } */