Skip to content

Commit 53e64c3

Browse files
committed
TST: Ensure simplified strictf77 path works
1 parent 0a3d0b1 commit 53e64c3

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
SUBROUTINE TESTSUB(INPUT1, & ! Hello
2+
! commenty
3+
INPUT2, OUTPUT1, OUTPUT2) ! more comments
4+
INTEGER, INTENT(IN) :: INPUT1, INPUT2
5+
INTEGER, INTENT(OUT) :: OUTPUT1, OUTPUT2
6+
OUTPUT1 = INPUT1 + &
7+
INPUT2
8+
OUTPUT2 = INPUT1 * INPUT2
9+
END SUBROUTINE TESTSUB

numpy/f2py/tests/test_regression.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,15 @@ def test_gh26148(self):
8888
res=self.module.testsub(x1, x2)
8989
assert(res[0] == 8)
9090
assert(res[1] == 15)
91+
92+
class TestF90Contiuation(util.F2PyTest):
93+
# Check that comments are stripped from F90 continuation lines
94+
sources = [util.getpath("tests", "src", "regression", "f90continuation.f90")]
95+
96+
@pytest.mark.slow
97+
def test_gh26148b(self):
98+
x1 = np.array(3, dtype=np.int32)
99+
x2 = np.array(5, dtype=np.int32)
100+
res=self.module.testsub(x1, x2)
101+
assert(res[0] == 8)
102+
assert(res[1] == 15)

0 commit comments

Comments
 (0)