aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2008-05-10 20:57:42 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2008-05-10 20:57:42 +0000
commite2c7c14dcb12eae1602f0a0c2c1daf0b126aad52 (patch)
treea0fe28a79c2d79ab03ec60e3f2c3c57b4bba0543 /gcc
parentd97a4451be8c81c8984b71403106b70bbf69299d (diff)
downloadgcc-e2c7c14dcb12eae1602f0a0c2c1daf0b126aad52.zip
gcc-e2c7c14dcb12eae1602f0a0c2c1daf0b126aad52.tar.gz
gcc-e2c7c14dcb12eae1602f0a0c2c1daf0b126aad52.tar.bz2
streamio_15.f90: Take care of Windows CRLF line terminator.
* gfortran.dg/streamio_15.f90: Take care of Windows CRLF line terminator. From-SVN: r135162
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/streamio_15.f9012
2 files changed, 15 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 30e7426..79cd88a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+ * gfortran.dg/streamio_15.f90: Take care of Windows CRLF line
+ terminator.
+
+2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
* gfortran.dg/fseek.f90: Take care of Windows CRLF line
terminator.
diff --git a/gcc/testsuite/gfortran.dg/streamio_15.f90 b/gcc/testsuite/gfortran.dg/streamio_15.f90
index 09d9a2a..bbe91f1 100644
--- a/gcc/testsuite/gfortran.dg/streamio_15.f90
+++ b/gcc/testsuite/gfortran.dg/streamio_15.f90
@@ -4,7 +4,15 @@
program main
implicit none
character(len=6) :: c
- integer :: i
+ integer :: i, newline_length
+
+ open(20,status="scratch",access="stream",form="formatted")
+ write(20,"()")
+ inquire(20,pos=newline_length)
+ newline_length = newline_length - 1
+ if (newline_length < 1 .or. newline_length > 2) call abort
+ close(20)
+
open(20,file="foo.txt",form="formatted",access="stream")
write(20,'(A)') '123456'
write(20,'(A)') 'abcdef'
@@ -15,7 +23,7 @@ program main
if (c.ne.'123456') call abort
! Save the position
inquire(20,pos=i)
- if (i.ne.8) call abort
+ if (i.ne.7+newline_length) call abort
! Read in the complete line...
read(20,'(A)') c
if (c.ne.'abcdef') call abort