* gas/all/gas.exp: Run dg-runtest for all err-*.s and warn-*.s.
authorHans-Peter Nilsson <hp@axis.com>
Mon, 22 Nov 2004 13:00:24 +0000 (13:00 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Mon, 22 Nov 2004 13:00:24 +0000 (13:00 +0000)
* gas/all/err-1.s, gas/all/warn-1.s: New tests.

gas/testsuite/ChangeLog
gas/testsuite/gas/all/err-1.s [new file with mode: 0644]
gas/testsuite/gas/all/gas.exp
gas/testsuite/gas/all/warn-1.s [new file with mode: 0644]

index 841d6fe..24d0b3c 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-22  Hans-Peter Nilsson  <hp@axis.com>
+
+       * gas/all/gas.exp: Run dg-runtest for all err-*.s and warn-*.s.
+       * gas/all/err-1.s, gas/all/warn-1.s: New tests.
+
 2004-11-18  Inderpreet Singh   <inderpreetb@nioda.hcltech.com>
 
        * gas/maxq10/call.d: Fix expected results now that bfd assembler
diff --git a/gas/testsuite/gas/all/err-1.s b/gas/testsuite/gas/all/err-1.s
new file mode 100644 (file)
index 0000000..68fbad5
--- /dev/null
@@ -0,0 +1,7 @@
+;# Test .error directive.
+;# { dg-do assemble }
+ .error "an error message"     ;# { dg-error "Error: an error message" }
+ .error an error message       ;# { dg-error "Error: .error argument must be a string" }
+ .error                                ;# { dg-error "Error: .error directive invoked in source file" }
+ .error ".error directive invoked in source file" ;# { dg-error "Error: .error directive invoked in source file" }
+ .error ""                     ;# { dg-error "Error: " }
index 6b06a2b..966c112 100644 (file)
@@ -194,3 +194,8 @@ if {   [istarget "i*86-*-*pe*"] \
     || [istarget "i*86-*-mingw32*"] } {
   gas_test "fastcall.s" ""   "" "fastcall labels"
 }
+
+load_lib gas-dg.exp
+dg-init
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/err-*.s $srcdir/$subdir/warn-*.s]] "" ""
+dg-finish
diff --git a/gas/testsuite/gas/all/warn-1.s b/gas/testsuite/gas/all/warn-1.s
new file mode 100644 (file)
index 0000000..873f230
--- /dev/null
@@ -0,0 +1,7 @@
+;# Test .warning directive.
+;# { dg-do assemble }
+ .warning "a warning message"  ;# { dg-warning "Warning: a warning message" }
+ .warning a warning message    ;# { dg-error "Error: .warning argument must be a string" }
+ .warning                      ;# { dg-warning "Warning: .warning directive invoked in source file" }
+ .warning ".warning directive invoked in source file"  ;# { dg-warning "Warning: .warning directive invoked in source file" }
+ .warning ""                   ;# { dg-warning "Warning: " }