diff options
Diffstat (limited to 'gcc-4.6/gcc/testsuite/lib/gcc-dg.exp')
-rw-r--r-- | gcc-4.6/gcc/testsuite/lib/gcc-dg.exp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc-4.6/gcc/testsuite/lib/gcc-dg.exp b/gcc-4.6/gcc/testsuite/lib/gcc-dg.exp index 4cdfa3e..450f278 100644 --- a/gcc-4.6/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc-4.6/gcc/testsuite/lib/gcc-dg.exp @@ -565,6 +565,24 @@ proc scan-module { args } { } } +# Scan Fortran modules for absence of a given regexp. +# +# Argument 0 is the module name +# Argument 1 is the regexp to match +proc scan-module-absence { args } { + set modfilename [string tolower [lindex $args 0]].mod + set fd [open $modfilename r] + set text [read $fd] + close $fd + + upvar 2 name testcase + if [regexp -- [lindex $args 1] $text] { + fail "$testcase scan-module [lindex $args 1]" + } else { + pass "$testcase scan-module [lindex $args 1]" + } +} + # Verify that the compiler output file exists, invoked via dg-final. proc output-exists { args } { # Process an optional target or xfail list. |