[flang] Make preprocessing behavior tests runnable as regression tests
And fix a minor bug exposed by doing so.
Differential Revision: https://reviews.llvm.org/D85164
diff --git a/flang/test/Preprocessing/pp030.F b/flang/test/Preprocessing/pp030.F
index 3022e0d..c04cf94 100644
--- a/flang/test/Preprocessing/pp030.F
+++ b/flang/test/Preprocessing/pp030.F
@@ -1,9 +1,11 @@
+! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! CHECK: if(777.eq.777)then
* /* C comment */ erased from #define
integer, parameter :: KWM = 666
#define KWM 777 /* C comment */
if (KWM .eq. 777) then
- print *, 'pp030.F pass'
+ print *, 'pp030.F yes'
else
- print *, 'pp030.F FAIL: ', KWM
+ print *, 'pp030.F no: ', KWM
end if
end