1// FIXME: Actually, "perl".
2REQUIRES: shell
3
4RUN: rm -rf %t.output_dir && mkdir %t.output_dir
5RUN: %scan-build -o %t.output_dir %clang -S %S/Inputs/single_null_dereference.c \
6RUN:     | FileCheck %s -check-prefix CHECK-STDOUT
7
8// Test html output
9
10CHECK-STDOUT: scan-build: Using '{{.*}}' for static analysis
11CHECK-STDOUT: scan-build: 1 bug found.
12CHECK-STDOUT: scan-build: Run 'scan-view {{.*}}' to examine bug reports.
13
14// We expect an index file, a file for the report, and sibling support files.
15RUN: ls %t.output_dir/*/ | FileCheck %s -check-prefix CHECK-FILENAMES
16
17CHECK-FILENAMES: index.html
18CHECK-FILENAMES: report-{{.*}}.html
19CHECK-FILENAMES: scanview.css
20CHECK-FILENAMES: sorttable.js
21
22
23// The index should have a link to the report for the single issue.
24RUN: cat %t.output_dir/*/index.html \
25RUN:     | FileCheck %s -check-prefix CHECK-INDEX-HTML
26
27CHECK-INDEX-HTML: <!-- REPORTBUG id="report-{{.*}}.html" -->
28
29// The report should describe the issue.
30RUN: cat %t.output_dir/*/report-*.html \
31RUN:     | FileCheck %s -check-prefix CHECK-REPORT-HTML
32
33CHECK-REPORT-HTML: <!-- BUGTYPE Dereference of null pointer -->
34