summaryrefslogtreecommitdiff
path: root/test/Misc/find-diagnostic-id.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Misc/find-diagnostic-id.c')
-rw-r--r--test/Misc/find-diagnostic-id.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Misc/find-diagnostic-id.c b/test/Misc/find-diagnostic-id.c
index bef66178f96f2..1cddde747f7db 100644
--- a/test/Misc/find-diagnostic-id.c
+++ b/test/Misc/find-diagnostic-id.c
@@ -1,5 +1,7 @@
-// RUN: diagtool find-diagnostic-id warn_unused_variable | FileCheck %s
+// RUN: diagtool find-diagnostic-id warn_unused_variable > %t; FileCheck %s < %t
+// RUN: cat %t | xargs diagtool find-diagnostic-id | FileCheck %s --check-prefix=INVERSE
// RUN: not diagtool find-diagnostic-id warn_unused_vars 2>&1 | FileCheck --check-prefix=ERROR %s
// CHECK: {{^[0-9]+$}}
+// INVERSE: warn_unused_variable
// ERROR: error: invalid diagnostic 'warn_unused_vars'