1 ## We're intentionally testing fatal errors, which isn't supported for testing
2 ## when main is run twice.
5 ## Check that we only see 20 (the default error-limit) "cannot open" errors
6 RUN: 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 | \
7 RUN: FileCheck -check-prefix=DEFAULT %s
9 DEFAULT: cannot open A:
10 DEFAULT: cannot open T:
11 DEFAULT-NOT: cannot open U:
12 DEFAULT-NEXT: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
14 ## Check that we only see 5 "cannot open" errors when --error-limit=5
15 RUN: not %lld --error-limit=5 A B C D E F G H I J 2>&1 \
16 RUN: | FileCheck -check-prefix=LIMIT5 %s
18 LIMIT5: cannot open A:
19 LIMIT5: cannot open E:
20 LIMIT5-NOT: cannot open F:
21 LIMIT5-NEXT: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
23 ## Check that we see all "cannot open" errors when --error-limit=0 (unimited)
24 RUN: 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 | \
25 RUN: FileCheck -check-prefix=UNLIMITED %s
27 UNLIMITED: cannot open A:
28 UNLIMITED: cannot open T:
29 UNLIMITED: cannot open U:
30 UNLIMITED: cannot open V:
31 UNLIMITED: cannot open W:
32 UNLIMITED-NOT: too many errors emitted, stopping now (use --error-limit=0 to see all errors)