llvm-project
32 строки · 1.3 Кб
1## We're intentionally testing fatal errors, which isn't supported for testing
2## when main is run twice.
3XFAIL: main-run-twice
4
5## Check that we only see 20 (the default error-limit) "cannot open" errors
6RUN: not %lld A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 2>&1 | \
7RUN: FileCheck -check-prefix=DEFAULT %s
8
9DEFAULT: cannot open A:
10DEFAULT: cannot open T:
11DEFAULT-NOT: cannot open U:
12DEFAULT-NEXT: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
13
14## Check that we only see 5 "cannot open" errors when --error-limit=5
15RUN: not %lld --error-limit=5 A B C D E F G H I J 2>&1 \
16RUN: | FileCheck -check-prefix=LIMIT5 %s
17
18LIMIT5: cannot open A:
19LIMIT5: cannot open E:
20LIMIT5-NOT: cannot open F:
21LIMIT5-NEXT: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
22
23## Check that we see all "cannot open" errors when --error-limit=0 (unimited)
24RUN: not %lld --error-limit=0 A B C D E F G H I J K L M N O P Q R S T U V W 2>&1 | \
25RUN: FileCheck -check-prefix=UNLIMITED %s
26
27UNLIMITED: cannot open A:
28UNLIMITED: cannot open T:
29UNLIMITED: cannot open U:
30UNLIMITED: cannot open V:
31UNLIMITED: cannot open W:
32UNLIMITED-NOT: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
33